RexJacobus
Programmer
Hi,
I have to set up an NT Service which a VB app which calls several SQL Server 7 stored procedures. I have set up other services which don't connect to SQL server and they run fine.
Here is my code:
Public mCon As New ADODB.Connection
Public msConnectionstring As String
msConnectionstring = "provider=SQLOLEDB.1;server=" _
& msServer _
& ";Database=" _
& msDBName _
& ";uid=" _
& msUserName _
& ";password=" _
& msPassword _
& ";NetworkLibrary=TCPIP" _
& ";"
mCon.ConnectionTimeout = 0
mCon.Open msConnectionstring
When I run this as an exe it works a treat but it always hangs on mCon.Open when it runs as an service.
Has any body else had this problem
jim
I have to set up an NT Service which a VB app which calls several SQL Server 7 stored procedures. I have set up other services which don't connect to SQL server and they run fine.
Here is my code:
Public mCon As New ADODB.Connection
Public msConnectionstring As String
msConnectionstring = "provider=SQLOLEDB.1;server=" _
& msServer _
& ";Database=" _
& msDBName _
& ";uid=" _
& msUserName _
& ";password=" _
& msPassword _
& ";NetworkLibrary=TCPIP" _
& ";"
mCon.ConnectionTimeout = 0
mCon.Open msConnectionstring
When I run this as an exe it works a treat but it always hangs on mCon.Open when it runs as an service.
Has any body else had this problem
jim