SQL语句的写法问题,谢谢大家的帮助~
VB代码中:
sql = "select ××××××××"
Set rs = con.Execute("update ×× SET aa ='sql'")
aa ='sql'正确应该怎么表达?
谢谢大家!
[解决办法]
Set rs = con.Execute("update ×× SET aa ='sql'")改为
Set rs =con.Execute("update ×× SET aa ='" & sql & "'")
[解决办法]
你的sql是什么,一个变量么? 如果是的话里面是什么值?
xx是表的名字么?aa是表内列的名字么?
你可以在相应的语句那里设置段点,看看你传进数据库里面的操作到底是什么
[解决办法]
Set rs = con.Execute(" " update grade A ,student BSET A.gno =B.numwhere A.examtime ='" + Text1.Text + "' And A.classname ='" + Text4.Text + " ' And B.stuname='" + DataCombo1.Text + "'")
[解决办法]
" update grade SET gno = " & sql & " where examtime ='" + Text1.Text + "' and classname ='" + Text4.Text + " ' "
试试看吧
试试这个
" update grade SET gno =( " & sql & ") where examtime ='" + Text1.Text + "' and classname ='" + Text4.Text + " ' "
[解决办法]
http://download.csdn.net/source/1644211
[解决办法]