AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Please help me

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
Duzy
Guest





PostPosted: Tue Apr 27, 2004 11:56 pm    Post subject: Please help me Reply with 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?

--
Duzy


Back to top
Christophe Vanfleteren
Guest





PostPosted: Wed Apr 28, 2004 6:58 am    Post subject: Re: Please help me Reply with quote



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





PostPosted: Wed Apr 28, 2004 11:15 am    Post subject: Re: Please help me Reply with quote




"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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.