救救我,vb,access查询

来源:百度知道 编辑:UC知道 时间:2024/06/04 10:22:26
Data1.RecordSource = "select * from password where [ID] like 'admin' "为何出查询不到?
Data1.RecordSource = "select * from password where [ID] = 'admin' "

也不行

Data1.RecordSource = "select * from password where [ID] like 'admin' "
Data1.RecordSource = "select * from password where [ID] = 'admin' "
“Data1.RecordSource =”这个地方直接用“=”进行连接??
下面的为ADO,说不定对你有点用。
Set Bbook = New ADODB.Recordset
Dim sql As String
sql = "select * from book where 图书编号='" & Trim(j) & "'"
Bbook.CursorLocation = adUseClient
Bbook.Open sql, cnn, adOpenDynamic, adLockPessimistic, adCmdText
Set DataGrid1.DataSource = Bbook

Data1.RecordSource = "select * from password where [ID] like '%admin%' "
试试