• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jdbc 2 Driver for DB2/UDB does not work

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The JDBC 2 Driver for DB2/UDB does not work..
I am using DB2 Client 7 fixpack 3..
The code is as below :
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
Connection conn = DriverManager.getConnection("jdbc:db2:Z1U2", "user", "pwd");
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
//Statement st = conn.createStatement();
ResultSet rs = st.executeQuery("select * from table");
while (rs.next()) {
System.out.println(rs.getString(1) + " - " + rs.getString(2));
}
The records are not retrieved, if the the scroll type and the concurrency are mentioned while creating the statement
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
But are retrieved if no parameters are mentioned while creating the statement..
Statement st = conn.createStatement();
No exceptions are thrown...
rs.next() returns false in the first case, true in the second case
Can anyone help me out....
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
does your driver documentation state whether they fully implement these features? Some drivers don't implement scrollable resultsets , but don't give you compiler/run time errors, just ignore the statement.
Jamie
[This message has been edited by Jamie Robertson (edited September 18, 2001).]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic