hi experts,
The .open stmt below gives error '[DBNETLIB]ConnectionOpen. SQLServer does not exist or access denied'
The SQL server (2000) db is running on this PC.
Is this probably a permissions issue?
Thanks, John
Option Explicit
Public GMcn As ADODB.Connection
Public GMrs As ADODB.Recordset
Public Sub ConnectToSQLServer()
Dim strSQL As String
Set GMcn = New ADODB.Connection
Set GMrs = New ADODB.Recordset
GMcn.ConnectionString = "Provider=sqloledb;Data Source=ELVIS;Initial Catalog=GM;Integrated Security=SSPI;"
strSQL = "Select * From ClmPayments2"
GMcn.Open '<<<-- this is where the error occurs
Call GMrs.Open(strSQL, GMcn, adOpenForwardOnly, adLockReadOnly, adCmdText)
The .open stmt below gives error '[DBNETLIB]ConnectionOpen. SQLServer does not exist or access denied'
The SQL server (2000) db is running on this PC.
Is this probably a permissions issue?
Thanks, John
Option Explicit
Public GMcn As ADODB.Connection
Public GMrs As ADODB.Recordset
Public Sub ConnectToSQLServer()
Dim strSQL As String
Set GMcn = New ADODB.Connection
Set GMrs = New ADODB.Recordset
GMcn.ConnectionString = "Provider=sqloledb;Data Source=ELVIS;Initial Catalog=GM;Integrated Security=SSPI;"
strSQL = "Select * From ClmPayments2"
GMcn.Open '<<<-- this is where the error occurs
Call GMrs.Open(strSQL, GMcn, adOpenForwardOnly, adLockReadOnly, adCmdText)