Rina
Rina

Reputation: 43

INSERT Failed: Error in MySql syntax in VB.net

I have a transaction procedure like this:

  INSERT INTO transaction(out, taxi_no, driver_name, odometer, date, mileage_out, hours_rent, remittance, total, shortage) VALUES (@out, @taxiNO, @drivername, @odometer, @date, @mout, @hours, @remittance, @total, @shortage)

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'out, taxi_no, driver_name, odometer, date, mileage_out, hours_rent, remittance, ' at line 1

I just copied the syntax and just change the values from my other project, it works well on my other project but when i tried to run the application, it gives me the error.

Upvotes: 1

Views: 78

Answers (1)

Rafiqul Islam
Rafiqul Islam

Reputation: 1646

out is a keyword in mysql so please add backtick ie `back quote`

Upvotes: 3

Related Questions