S
Scott
I have code that fires from a command button and runs a stored procedure
from a sql server on network. Below is the code and works on my development
client pc, but times out when run from other client pcs within same office,
domain, etc. It gives error on "Open myDSN".
Is there a better connection string or more efficient way to open a
connection to a sql server from a button click?
Dim cnn As ADODB.Connection
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset
Dim myDSN
Set cnn = New ADODB.Connection
Set cmd = New ADODB.Command
Set rs = New ADODB.Recordset
sDSN = "Provider=sqloledb;" & _
"Data Source=999.999.999.999;" & _
"Initial Catalog=mydatabase;" & _
"User Id=muusername;" & _
"Password=mypassword;Network Library=dbmssocn"
cnn.Open myDSN
' My sproc code is here, but it never gets past above line
from a sql server on network. Below is the code and works on my development
client pc, but times out when run from other client pcs within same office,
domain, etc. It gives error on "Open myDSN".
Is there a better connection string or more efficient way to open a
connection to a sql server from a button click?
Dim cnn As ADODB.Connection
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset
Dim myDSN
Set cnn = New ADODB.Connection
Set cmd = New ADODB.Command
Set rs = New ADODB.Recordset
sDSN = "Provider=sqloledb;" & _
"Data Source=999.999.999.999;" & _
"Initial Catalog=mydatabase;" & _
"User Id=muusername;" & _
"Password=mypassword;Network Library=dbmssocn"
cnn.Open myDSN
' My sproc code is here, but it never gets past above line