aspose file tools*
The moose likes JDBC and the fly likes jdbc DRIVER for MS Sql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jdbc DRIVER for MS Sql " Watch "jdbc DRIVER for MS Sql " New topic
Author

jdbc DRIVER for MS Sql

Eva Tang
Greenhorn

Joined: Oct 06, 2003
Posts: 12
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

Joined: Jul 11, 2001
Posts: 15286
    
    6

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.


GenRocket - A Test Data Generation Platform
Eva Tang
Greenhorn

Joined: Oct 06, 2003
Posts: 12
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

Joined: Apr 20, 2000
Posts: 3252
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

Joined: Jul 11, 2001
Posts: 15286
    
    6

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jdbc DRIVER for MS Sql
 
Similar Threads
Urgent : JDBC Driver for MS SQL Server 7
JDBC Driver for MSSQL
MS SQL JDBC driver download
jdbc + max(field)
Sun jdbc odbc bridge error