Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 jdbc connection sql server 2008

Author  Topic 

abc_fffg
Starting Member

2 Posts

Posted - 2008-10-17 : 09:25:25
I'm having trouble connecting to sql server 2008 using jdbc driver 1.2.
I'm running the server on windows vista and I use netbeans ide.

I have enabled tcp/ip protocol, set the port number 1433
and still get the following exception:
The server version is not supported. The target server must be SQL Server 2000 or later."


here..
String connectionURL = "jdbc:sqlserver://A-PC\\SQLEXPRESS:1433;databaseName=users;";

conn = DriverManager.getConnection(connectionURL);

I'm using windows auth mode.

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-10-17 : 11:18:37
that connection string is definitely wrong.

"Driver={SQL Native Client};Server=YourServername\SQLEXPRESS,1433;Database=yourDatabase;Uid=username;Pwd=password; "

see www.connectionstring.com

Also for the server. Its more like A-PC\\SQLEXPRESS,1433
Go to Top of Page

abc_fffg
Starting Member

2 Posts

Posted - 2008-10-17 : 13:06:03
My connection string works just fine with sql server 2005 if I set the integratedSecurity parameter to true.

Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-10-17 : 13:09:49
for 2008 see www.connectionstring.com
Go to Top of Page
   

- Advertisement -