关于数据库连接问题
各位高手:
Private Sub Form_Load()
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim str As String
str = "driver={sql server};server=wcg;uid=sa;pwd=;database=销售质量异议"
conn.Open str
str = "select * from zhlyy2"
rs.Open str, conn, adOpenDynamic, adLockPessimistic
Set DataGrid1.DataSource = rs
End Sub
为什么运行时提示“实时错误‘7004’,行集合不能作为标签”
错误语句:Set DataGrid1.DataSource = rs