vb查询语句好像不正确,请高手们帮我看看

来源:百度知道 编辑:UC知道 时间:2024/05/10 14:57:17
Private Sub Command6_Click()

ss2 = Text2.Text
ss3 = Text3.Text
ss4 = Text4.Text
ss5 = Text5.Text

Adodc1.RecordSource = "SELECT * FROM rs where " + ss2 + "='" + ss3 + "' and " + ss4 + "='" + ss5 + "'"

rs是表名吗?如果不是,换成表名
Adodc1.RecordSource = "SELECT * FROM [表名] where " & ss2 & "='" & ss3 & "' and " & ss4 & "='" & ss5 & "'"

select * from rs where ss2= ss3 and ss4 =ss5?
这什么语句?