|
-
May 14th, 2003, 04:48 PM
#1
Thread Starter
Junior Member
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
-
May 14th, 2003, 06:34 PM
#2
Lively Member
If num is in fact a number than do not put tic marks in the quotes, should just be like this
...," & num & " )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|