"select * from '" & Combo1.Text & "' where '" & List1.Text & "' = '" & Text1.Text & "'"
Adodc1.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;DataSource="&App.Path&"\dat...
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\data.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from '" & Combo1.Text & "' where '" & List1.Text & "' = '" & Text1.Text & "'"
Adodc1.Refresh
其中Combo1中是表名,List1是表中的属性项,Text1中是查询内容
运行老是出现"查询语法错误,查询字句不完整"的错误,我刚刚开始学vb,不知道哪里有误.
高手们,帮帮忙啊 展开
Adodc1.RecordSource = "select * from '" & Combo1.Text & "' where '" & List1.Text & "' = '" & Text1.Text & "'"
Adodc1.Refresh
其中Combo1中是表名,List1是表中的属性项,Text1中是查询内容
运行老是出现"查询语法错误,查询字句不完整"的错误,我刚刚开始学vb,不知道哪里有误.
高手们,帮帮忙啊 展开
展开全部
Adodc1.RecordSource = "select * from " & Combo1.Text & " where " & List1.Text & " = '" & Text1.Text & "'"
规范的话也可以这么写 ...
Adodc1.RecordSource = "select * from `" & Combo1.Text & "` where `" & List1.Text & "` = '" & Text1.Text & "'"
规范的话也可以这么写 ...
Adodc1.RecordSource = "select * from `" & Combo1.Text & "` where `" & List1.Text & "` = '" & Text1.Text & "'"
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询