PDA

View Full Version : Java & SQL Server



Black Mage
October 1st, 2007, 02:33 PM
Hey,

Is there a recommended bridge or driver I should be using to connect Java in Ubuntu to a SQL 2000 Server?

Howler9443
October 1st, 2007, 04:32 PM
I'm using JTDS driver with SQLServer 2000 and it seems to work great.

http://jtds.sourceforge.net/

I hope this helps.

Black Mage
October 1st, 2007, 06:23 PM
Does your code look anything like this for connecting?



//Connect to the Database
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://192.168.1.216:1433");
stmt = con.createStatement();