Hi all
Dim cnConn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cnConn = New ADODB.Connection
Set rs = New ADODB.Recordset
With cnConn
.Provider = "SQLOLEDB.1"
.Properties("Data Source").Value = "server"
.Properties("User ID").Value = "clroot"
.Properties("Password").Value = "clroot"
.Properties("Initial Catalog").Value = "iosif"
.CursorLocation = adUseClient
.ConnectionTimeout = 0
.Open
End With
strSQL = "select prcencd,name from salesman where slsmanstat=0 and prcencd<>001"
' **** Open Records for readonly ****
rs.Open strSQL, cnConn, adOpenStatic, adLockReadOnly
I have this code and I wont to insert more (almost 10) 'strsql' string what I must do to make this hapen??
thanks to all
Dim cnConn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cnConn = New ADODB.Connection
Set rs = New ADODB.Recordset
With cnConn
.Provider = "SQLOLEDB.1"
.Properties("Data Source").Value = "server"
.Properties("User ID").Value = "clroot"
.Properties("Password").Value = "clroot"
.Properties("Initial Catalog").Value = "iosif"
.CursorLocation = adUseClient
.ConnectionTimeout = 0
.Open
End With
strSQL = "select prcencd,name from salesman where slsmanstat=0 and prcencd<>001"
' **** Open Records for readonly ****
rs.Open strSQL, cnConn, adOpenStatic, adLockReadOnly
I have this code and I wont to insert more (almost 10) 'strsql' string what I must do to make this hapen??
thanks to all