Connecting to SQL Servergreenspun.com : LUSENET : SQL Server Database Administration : One Thread |
I am new to SQL server 7 and I am trying to connect to it via VB6. I am having problems with my connection string. I can not get the connection to establish. The connection will stay at a 1 state (connecting), but I cant get it to go to 2 state (connected). Any suggestion?? Thank you for your help. Anthony
-- Anonymous, August 11, 1999
Anthony,You haven't mentioned what connection technology you are using or what your current connection string is, but I found this ADO connection string in a usenet posting. This string is reported to work with SQL 7.0 and VB6 (except that the poster says it does not work with sa):
Public Const gm_default_ConnectionString = "Provider=SQLOLEDB.1;" & "User ID=myUser;" & "Password=myPwd;" &"Initial Catalog =" & gCustDB & ";" & "Data Source=" & gCustServer & ";" & "Trusted_Connection=No;"
Hope this helps,
Eric
-- Anonymous, August 11, 1999