用ADO连接
Dim Conn As New ADODB.Connection, Rs As New ADODB.Recordset
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=123;Data Source=C:\AA.mdb;Persist Security Info=False" '连接数据库
Rs.CursorLocation = adUseClient '设置游标属性
StrSQL = "Select * from AA"
Rs.open StrSQL,Conn,1,1 '查询记录