aspose file tools*
The moose likes JDBC and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "" jdbc : odbc :  " + something. what is this something?" Watch "" jdbc : odbc :  " + something. what is this something?" New topic
Author

" jdbc : odbc : " + something. what is this something?

Arul Jose
Ranch Hand

Joined: Jan 14, 2005
Posts: 131
when we use write url for jdbc, we write like this.

String url = "jdbc : odbc : "+something.

this something is the data source name. how to write it for ms access.

any one to help?

arul jose.
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
"something" is name of your ODBC datasource.


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Arul Jose
Ranch Hand

Joined: Jan 14, 2005
Posts: 131
can you give an example for how to write it?
sandip mense
Greenhorn

Joined: Oct 14, 2003
Posts: 28
Arul,
Basically you need to point to the mdb file. The code would be like this.
String testDB = "e:\\TestDatabase.mdb";
String fullConnectionString = "jdbc: odbc: driver={Microsoft Access Driver (*.mdb)};DBQ=" + testDB ;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection(fullConnectionString);

Regards,

Sandip
Arul Jose
Ranch Hand

Joined: Jan 14, 2005
Posts: 131
thank you sandip.

ive got it.

String db = "C:\\Documents and Settings\\Aruljose\\Desktop\\db.mdb";
String url = "jdbc dbc river={Microsoft Access Driver (*.mdb)};DBQ=" + db ;

jose.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: " jdbc : odbc : " + something. what is this something?
 
Similar Threads
need help in ms access
need help in ms access
need a sample code JDBC ..preparedstatement
Establishing Connection to MS Access Databases
help with basic authentication