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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to the SQL server on the Local Machine?

Status
Not open for further replies.

itmasterw

Programmer
Apr 13, 2003
147
US
Trying ot connecting to the SQL server, which is in stalled on my computer. I ahve been able to do this if I leave out the server name aas follows:

Set adoConnect = New ADODB.Connection
adoConnect.ConnectionString = "Provider=SQLOLEDB;Data Source=;Initial Catalog=Sales;Integrated Security=SSPI;Persist Security Info=False;"
adoConnect.Open

* This works, but I was wondering why does it only work without the server name. If any one has an Idea I would apperaciate it.
 
Its obvious that its assuming the local machine as a default SQL Sever and thats why it does work without the
server name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top