求助~如何将数据显示在 DataGrid 上
Private Sub Form_Load()Dim conn As ADODB.Connection
Dim rs As New ADODB.Recordset
Dim Connstr As String
Dim Mdbpath As String
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
Connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path & "\D:\VB数据\db1.mdb"
conn.Open
rs.CursorLocation = adUseClient
rs.Open "select 档案编号,姓名 from 车辆档案表", conn, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = rs
End Sub