B
B-Dog
I have a vb form that I'm using to insert some data off the fields in the
sql server but if any of the field have punctuation like comma, dash,
apostrophe's it throws an error on insert. Any ideas, why? All the fields
in the database and dataset except for ID and Date are strings. Here is my
insert command. Thanks
Dim sqlInsert As String = "INSERT INTO Files ( FileName, Link, Description,
WO, sTo, WONumber, " _
& "Client, FileTo, FileFrom) SELECT '" & filename & "', '" & link & "', '" &
fDescription.Text & "', '" & wo & "', '" _
& fDistribution.Text & "', '" & woNumber & "', '" & client & "', '" &
fTo.Text & "', '" & fFrom.Text & "'"
sql server but if any of the field have punctuation like comma, dash,
apostrophe's it throws an error on insert. Any ideas, why? All the fields
in the database and dataset except for ID and Date are strings. Here is my
insert command. Thanks
Dim sqlInsert As String = "INSERT INTO Files ( FileName, Link, Description,
WO, sTo, WONumber, " _
& "Client, FileTo, FileFrom) SELECT '" & filename & "', '" & link & "', '" &
fDescription.Text & "', '" & wo & "', '" _
& fDistribution.Text & "', '" & woNumber & "', '" & client & "', '" &
fTo.Text & "', '" & fFrom.Text & "'"