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.
Author |
Topic |
vikram
Starting Member
3 Posts |
Posted - 2003-09-12 : 06:27:03
|
Hi,I have SQL Server 7.0 installed on a server. On top of that I have installed SQL Server 2000. SQL Server 2000 installation asked me for an instance name. So, I created an instance by the name 'SQL2000Instance'. I want to connect to both SQL Server 7.0 and SQL Server 2000 through my java code and pick some different sets of values from them.I am able to connect to SQL Server 7.0 by providing the name of the machine say "PC1" and the user id and password. I tried connecting to SQL Server 2000 with providing the name as "PC1\SQL2000Instance" the user id and password, but I was unable to.I changed the port number with the help of Server Network Utility of SQL Sever for the 'SQL2000Instance'.For SQL Server 7.0 I gave the syntax as DriverManager.getConnection("jdbc:jtds:sqlserver://PC1:1433/SBA000cef8;","sa","");For SQL Server 2000 I gave the syntax as DriverManager.getConnection("jdbc:microsoft:sqlserver://PC1\\SQL2000Instance:1432;SelectMethod=cursor;databasename=Data1;","sa","");Please note I have a different port number for both. But I am not able to connect with the second syntax. I get a Socket Connect Error.Please advice.Thanks,Vikram |
|
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2003-09-12 : 07:44:01
|
//just syntax, but try \\ insteadVoted best SQL forum nickname...."Tutorial-D" |
|
|
|
|
|