 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Duzy Guest
|
Posted: Tue Apr 27, 2004 11:56 pm Post subject: Please help me |
|
|
Hi,
in this code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:mydb";
Connection con = DriverManager.getConnection(url);
what is this "mydb"? I want to make a connection with my database made in Ms
Access 2000, but I don't know how... how can I connect to my database
jdbc:odbc bridge?
--
Duzy
|
|
| Back to top |
|
 |
Christophe Vanfleteren Guest
|
Posted: Wed Apr 28, 2004 6:58 am Post subject: Re: Please help me |
|
|
Duzy wrote:
| Quote: | Hi,
in this code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:mydb";
Connection con = DriverManager.getConnection(url);
what is this "mydb"? I want to make a connection with my database made in
Ms Access 2000, but I don't know how... how can I connect to my database
jdbc:odbc bridge?
|
You'll need to make the ODBC connection somewhere in the Configuration Panel
in Windows.
Ask a windows group if you don't know how to do that.
--
Kind regards,
Christophe Vanfleteren
|
|
| Back to top |
|
 |
Bjorn Abelli Guest
|
Posted: Wed Apr 28, 2004 11:15 am Post subject: Re: Please help me |
|
|
"Christophe Vanfleteren" wrote...
| Quote: | in this code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:mydb";
Connection con = DriverManager.getConnection(url);
what is this "mydb"?
|
It's a DSN (Data Source Name), which must be registered in your local
machine's data sources, or...
| Quote: | I want to make a connection with my database made
in Ms Access 2000, but I don't know how...
how can I connect to my database jdbc:odbc bridge?
You'll need to make the ODBC connection somewhere
in the Configuration Panel in Windows.
Ask a windows group if you don't know how to do that.
|
....or just use the Access Driver and provide a
path to the mdb-file...
String url = "jdbc:odbc:" +
"DRIVER={Microsoft Access Driver (*.mdb)};" +
"DBQ=c:\foo\bar.mdb";
// Bjorn A
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|