Reputation: 137
I've got a problem that's driving me crazy. I get an exception "Incorrect syntax near "@p1" " when I'm inserting data into my database.
I looked for solutions on the internet but nothing solved this problem so far. Does anyone have a clue what is wrong with my code? Thanks! (By the way, sorry for some foreign language in code. It's a school project and the school that I'm attending is not english)
Upvotes: 0
Views: 1254
Reputation: 68
Your insert statement should be like this :
INSERT INTO
INSERT INTO Leti VALUES (@p1,@p2,@p3,@p4);
Upvotes: 1
Reputation: 22841
You got your insert syntax wrong, it should be:
INSERT INTO Leti VALUES ( @p1,@p2,@p3,.....)
^ ^
|-you missed these-|
Upvotes: 3