Basic HTML version of Foils prepared 7 October 97

Foil 48 Example - using Imaginary's mSQL Driver -II

From Overview of JDBC and its use with Microsoft Access ARL Database Tutorial -- February 98. by Nancy McCracken(Sangetta Aggarwal, Udayan Parvate, Tom Pulikal)


1 while (rs.next() ) {
2 int a = rs.getInt(1);
3 String str = rs.getString(2);
4 System.out.println("key = " + a);
5 System.out.println("str = " + str); }
6 //close the query execution and the database
7 connection before exiting
8 stmt.close();
9 conn.close();
10 }
11 //catch any exception and print it to the
12 system output
13 catch ( Exception e) {
14 System.out.println (e.getMessage() );
15 e.printStackTrace();
16 }
17 } // End main
18 } // End class Select

in Table To:


© on Mon Oct 13 1997