Sunday, February 11, 2007

Clear Little Blisters In

Connect to java

To connect to a db in java is made the following statement:
The following example is designed for a db with jdbc driver
and in this case with a DB access. For any other BD
camber just have the type of driver and connect statement.
String DATABASE = 'Example.mdb'; (sun.jdbc.odbc.JdbcOdbcDriver ");
/ / Connect to the database
Connection = DriverManager.getConnection (" jdbc: odbc: Driver = {Microsoft Access
Driver (*. mdb)}; DBQ = "+ DATABASE);

} catch (ClassNotFoundException cnfe)
{/ / No driver
System.out.println (cnfe);}



0 comments:

Post a Comment