Reputation: 17
I want to update status and confirmstudentID to the room table at the same time, can I do in single sql code or should I split it out? How?
sql = "update room set status = '" & status & "' and set confirmstudentid= " & Form1.stuID & "where id=" & lblroomID.Text & ";"
Upvotes: 0
Views: 158
Reputation: 7689
Try the below;
sql = "update room set status = '" & status & "' , confirmstudentid = " &
Form1.stuID & " where id= " & lblroomID.Text & ";"
You only need to separate the columns by a comma ,
instead of adding another set
Upvotes: 2