Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jdbc:odbc connection string

843785Jul 18 2008 — edited Jul 18 2008
I have a server with SQL Server 2005. I have made a .udl file to verify that the DSN is working. The server is up and running everything is working fine. However, I am havign trouble accessing it with my JAVA code. What is the correct format for DriverManager.getConnection();?
I am trying:
DriverManager.getConnection("jdbc:odbc:DSNNAME;user=username;password=password");

and I am getting:
Exception: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

please help!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2008
Added on Jul 18 2008
2 comments
2,059 views