链接代码如下
Private Sub Command_Click()
Dim cn As Connection
Dim rs As Recordset
Dim str As String
Set cn = New ADODBConnection
str = Provider=SQLOLEDB;Persist Security Info=False;User ID=sa;Initial Catalog=RSDAGLXT;Data Source=
cnOpen str
Set rs = New ADODBRecordset
rsCursorType = adOpenKeyset
rsLockType = adLockOptimistic
rsOpen 人事档案信息表 cn
Set MSHFlexGridDataSource = rs
End Sub