Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDBC

Status
Not open for further replies.

ice78991

Programmer
Nov 20, 2006
216
0
0
I have just downloaded the JDBC Drivers for SQl Server 2005 from Microsoft. Can I use these drivers to connect to a sql server using a TCP connection. I am looking for something similar to the following c# code in java

string str = "Data Source=127.0.0.1,1909;" +
"Network Library=DBMSSOCN;" +
"Initial Catalog=master;" +
"User ID=sa;" +
"Password=pass;";


try
{
myConnection = new SqlConnection(str);
}
catch(Exception e)
{
Console.WriteLine(e.ToString());
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top