C
Chaplain Doug
Excel 2003. SQl Server 2005. I have the following code that worked fine
with SQL Server 2000. Now that I have installed SQL 2005, it no longer
works. What do I need to change?
Dim cn As ADODB.Connection
Dim sql As String
On Error GoTo Err_PT
Set cn = New ADODB.Connection
cn.Open "Provider=sqloledb;" & _
"Data Source=HQServer;" & _
"Initial Catalog=Good_News_FE;" & _
"User ID=FEOpen7;" & _
"Password=fe"
Incidentally, The SQL 2005 Server is names HQSERVER, the database is named
Good_News_FE. The user name FEOpen 7 exists and it has a password of fe.
Moreover, user FEOpen7 has been defined to have access to the database.
When the above code executes, it returns the follwing error:
Error Number: -2147467259
Error Text: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
or access denied.
THANKS for any help that could be provided. God bless.
with SQL Server 2000. Now that I have installed SQL 2005, it no longer
works. What do I need to change?
Dim cn As ADODB.Connection
Dim sql As String
On Error GoTo Err_PT
Set cn = New ADODB.Connection
cn.Open "Provider=sqloledb;" & _
"Data Source=HQServer;" & _
"Initial Catalog=Good_News_FE;" & _
"User ID=FEOpen7;" & _
"Password=fe"
Incidentally, The SQL 2005 Server is names HQSERVER, the database is named
Good_News_FE. The user name FEOpen 7 exists and it has a password of fe.
Moreover, user FEOpen7 has been defined to have access to the database.
When the above code executes, it returns the follwing error:
Error Number: -2147467259
Error Text: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
or access denied.
THANKS for any help that could be provided. God bless.