Dim Conn As New ADODB.Connection
Dim Rc As New ADODB.Recordset
Dim Sql As String
Sql = "select * from 读者名细 where 读者编号="001""
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=app.path & "\book.MDB";Persist Security Info=False"
Conn.Open
Rc.Open Sql, Conn, adOpenKeyset, adLockOptimistic
set MSHFlexGrid1.DataSource = Rc
MSHFlexGrid1.Refresh
(MSHFlexGrid1与ado控件绑定,查询纪录显示在MSHFlexGrid1中)