Dim cn As New ADODB.Connection
Dim dr As New ADODB.Recordset
Dim a As String
a = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\db1.mdb;Persist Security Info=False"
cn.Open a
dr.Open ("select id from used"), cn, 3, 2
dr.MoveFirst
If dr.EOF = True Then
Text1.Text = dr.Fields("id")
dr.MoveNext
End If
这样连接不出错了。
库里面ID为第一列
我想问一下,怎么样取ID列的数据呀?