Hi, I am trying to use jTDS driver 0.9rc1 to connect to SQL 2000 and I am keep getting following error... java.sql.SQLException: Cannot open database requested in login 'testdb'. Login fails. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:366) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2048) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:1648) at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:462) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:274) at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:48) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:112) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at SQLTest.main(SQLTest.java:15)
Hi Jeanne, I tried even with port but I am still getting the error. Infact when create ODBC connection to the same database with same user and password it works fine. I tried jdbc dbc bridge, it works there! I dont know what I am missing here for this jTDS. Looks like it is identifying the database and not able to authenticate the login.
Joined: Aug 27, 2003
problem solved! It was issue with roles assigned to the user. I should select only public role to access table owned by 'dbo'. I changed the roles and now it works.
thanks for the effort. ravi
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: jTDS Driver is giving error when connecting to SQL 2000