S
stephenc
I'm having a problem with an SQL connection (MS SQL Server). Below is my
current connection string:
Dim myServer As String, myDatabase As String
Dim myUID As String, myPassword As String
myServer = "Paris"
myDatabase = "Documents"
myUID = "admin"
myPassword = "test"
sConnectionString = "driver={SQL Server};" & _
"server=" & myServer & ";database=" & myDatabase & _
";uid=" & myUID & ";pwd=" & myPassword
Set Conn = New ADODB.Connection
Set rs = New ADODB.Recordset
Conn.Open sConnectionString
On execution I'm getting runtime error "-2147217843 [Microsoft][ODBC SQL
Server Driver][SQL Server]Login failed for user 'admin'.
The test my setup, I have made a connection to the database via the relevant
wizard in Excel 2007, so the ODBC setup in Data Sources (Control Panel) is
good.
I'd really appreciate some input on this please. Any ideas what I'm doing
wrong?
Regards,
Stephenc
current connection string:
Dim myServer As String, myDatabase As String
Dim myUID As String, myPassword As String
myServer = "Paris"
myDatabase = "Documents"
myUID = "admin"
myPassword = "test"
sConnectionString = "driver={SQL Server};" & _
"server=" & myServer & ";database=" & myDatabase & _
";uid=" & myUID & ";pwd=" & myPassword
Set Conn = New ADODB.Connection
Set rs = New ADODB.Recordset
Conn.Open sConnectionString
On execution I'm getting runtime error "-2147217843 [Microsoft][ODBC SQL
Server Driver][SQL Server]Login failed for user 'admin'.
The test my setup, I have made a connection to the database via the relevant
wizard in Excel 2007, so the ODBC setup in Data Sources (Control Panel) is
good.
I'd really appreciate some input on this please. Any ideas what I'm doing
wrong?
Regards,
Stephenc