Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc DRIVER for MS Sql

 
Eva Tang
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using j2ee 1.3, I don't think a JDBC driver is included in it. I need a jdbc driver for ms sql, I've tried looking on the sun website they only have documentation for the jdbc driver nowadays. Can anyone please tell me where I can download the jdbc driver? Thanks
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Microsoft JDBC Driver for SQL Server 2000
And this works ONLY with SQL Server 2000. This one is free. There are several out there if you are willing to pay for it. Also, you can also use the jdbc.odbc.Driver that comes with the JDK. You would then of couse have to have an ODBC entry for the database.
 
Eva Tang
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I use the jdbc odbc driver, here is my code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc dbc://10.213.91.81/TEST";
Connection conn = DriverManager.getConnection(url, "", "");
but I keep getting
>Got an exception!
>[Microsoft][ODBC Driver Manager] Data source name not found and no default >driver specified
error when I try to connect to the database.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, first question is whether the TEST data source exists on the computer you're trying to run the Java application on?
- Peter
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using the JDBC DBC bridge, why did you ask where you could download a Driver from?
Peter is correct. Make sure that you have setup the datasouce in your ODBC settings on that PC.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic