aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes problem to get integer value in MSAccess please help.. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "problem to get integer value in MSAccess please help.." Watch "problem to get integer value in MSAccess please help.." New topic
Author

problem to get integer value in MSAccess please help..

Rohan Patel
Greenhorn

Joined: Jun 13, 2011
Posts: 1
try {

//String a=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbcdbc:newtest");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from department");
while (rs.next()) {
department.Deptbean u1 = new department.Deptbean();
// a=rs.getString(1);
u1.setDept_id(rs.getString(1));
u1.setName(rs.getString(2));//Problem in this statement
//cant get integet value & rs.getInt() not working

listd.add(u1);
System.out.println("Prob"+rs.getString(1));
}

} catch (Exception ex) {
System.out.println("Prob:"+ex.toString());






Exception is
Prob:java.sql.SQLException: No data found
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem to get integer value in MSAccess please help..
 
Similar Threads
how to load the values in one object?
regarding Retrival of multiple values from db using result set
setAutoCommit(false) not working
Problem in ResultSet
how to improve my program code ?