连接ACCESS数据库问题
在线等,请教各位大哥,以下连接数据部分问题出在哪里,改如何调整。谢谢'连接数据
Dim conn As New ADODB.Connection
Dim RsQQ1 As New ADODB.Recordset
RsQQ1.CursorLocation = adUseClient
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Data\test.mdb" & ";Persist Security Info=False"
conn.Open ConnectionString
RsQQ1.Open "select * from tb ", conn, adOpenKeyset, adLockOptimistic
Text1.Text = "符合查询条件共有"
Text2.Text = RsQQ1.RecordCount
Text3.Text = "条记录!"
Text4.Text = "学院共有" & RsQQ1.RecordCount & "栋楼房"
RsQQ1.Close
conn.Close
Set RsQQ1 = Nothing
Set conn = Nothing