-
SQL INSERT in VB.NET
Can anyone tell me what I am doing wrong with this statement ?
Dim MyCommand As New OleDbCommand("INSERT INTO tblQuestion(QuestionType,UserID,QuestionID) VALUES ('VERB', '2', ' "& num &" ')", dbconn)
I am reading some values from the form and some constants.
IS the formatting correct ? If I get rid of the double quotes around (' " & num &" ' ) , the SQL query doesn't execute...if I put them, it doesn't compile and says comma or end expected after the double quotes.
Thanks for your time
-
If num is in fact a number than do not put tic marks in the quotes, should just be like this
...," & num & " )