Problem with UPDATE sql command

Itchyo

New member
Joined
Mar 16, 2010
Messages
4
Programming Experience
1-3
I'm trying to update a some fields which include a primary key in a table of my database which has a many to one relationship with another field of a different table.

So i'm guessing i need to update both of the primary keys at the same time.
I'm using
sql = " INSERT INTO MenuOrder (OrderID, Dish, Quantity) VALUES ('" & orderID & "', '" & dishname & "', '" & quantity & "')
AND INSERT INTO OrderPrice
(OrderID, Total Price, MonthID) VALUES ('" & orderID & "', '" & TPrice & "', '" & monthnow & "');"

I get this error:
Missing semicolon (;) at end of SQL statement.

Any ideas?
Thanks in advance
 
You don't use AND to join multiple statements. AND is for joining multiple conditions. Multiple statements are separated by semicolons, as the error message suggests.
 
Back
Top