brucelim80
Active member
- Joined
- Apr 20, 2006
- Messages
- 35
- Programming Experience
- Beginner
hi Does any one know how to code a SQL statement to allow symbol such as ' to be inserted into the database
I had a code like this
Dim insertprocess As String = "INSERT INTO TrackingDB(workid, username, dept, reportdate, reporttime, " & _
"reinputby, execdate, exectime, systemid, problemcat, descriptiond, problemdetail, handleby, statusid, completeddate, completedtime, resolutiontxt)" & _
"VALUES ('" & lastserialworkid & "','" & reqname & "','" & departname & "','" & reqdate & "','" & reqtime & "','" & inputby & "','" & _
exdate & "','" & extime & "','" & systems & "','" & procat & "','" & prodetails & "','" & prodetailss & "','" & handleby & "','" & status & "','" &
compdat & "','" & comptime & "','" & prores & "')"
However, when i enter a ' and store into one of the variable, it shows syntax error.
Can anyone help me with this>?
Thank you
I had a code like this
Dim insertprocess As String = "INSERT INTO TrackingDB(workid, username, dept, reportdate, reporttime, " & _
"reinputby, execdate, exectime, systemid, problemcat, descriptiond, problemdetail, handleby, statusid, completeddate, completedtime, resolutiontxt)" & _
"VALUES ('" & lastserialworkid & "','" & reqname & "','" & departname & "','" & reqdate & "','" & reqtime & "','" & inputby & "','" & _
exdate & "','" & extime & "','" & systems & "','" & procat & "','" & prodetails & "','" & prodetailss & "','" & handleby & "','" & status & "','" &
compdat & "','" & comptime & "','" & prores & "')"
However, when i enter a ' and store into one of the variable, it shows syntax error.
Can anyone help me with this>?
Thank you