[求助]这句话是什么意思
RS.Open strSQL, conn, adOpenStatic, adLockReadOnly
[此贴子已经被作者于2006-12-27 14:49:25编辑过]
Private objConnection As New ADODB.Connection
Private strConn As String
Private rs As ADODB.Recordset
Private strSql As String
'连接并打开数据库(用于Inquiry)
Private Sub OpenRS(ByRef rs As ADODB.Recordset, ByVal strSql As String)
Call Connect(rs, strSql)
rs.Open strSql, objConnection, , adCmdText
End Sub
'连接数据库
Private Sub Connect(ByRef rs As ADODB.Recordset, ByVal strSql As String)
strConn = "Provider=SQLOLEDB.1;Password=sql;
Persist Security Info=True;User ID=sa;Initial Catalog=master;
Data Source=HI1-PAULS-ZHANG"
objConnection.CursorLocation = adUseClient
If objConnection.State = adStateClosed Then
objConnection.Open strConn
End If
End Sub