Basic HTML version of Foils prepared 7 October 97

Foil 53 Example - Using JDBC-ODBC Bridge - 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 Connection con = DriverManager.getConnection (
2 url, "my-user", "my-passwd");
3
4 // If we were unable to connect, an exception
5 // would have been thrown. So, if we get here,
6 // we are successfully connected to the URL
7
8 // Get the DatabaseMetaData object and display
9 // some information about the connection
10
11 DatabaseMetaData dma = con.getMetaData ();
12
13 System.out.println("\nConnected to " + dma.getURL());
14 System.out.println("Driver " +
15 dma.getDriverName());
16 System.out.println("Version " +
17 dma.getDriverVersion());
18 System.out.println("");

in Table To:


© on Mon Oct 13 1997