Hi there,
I'm having a hard time automatically editing some users to my SQL DB.
I established it is because the surname of the people I am adding
contains an " ' ", eg surname = O'Connel
What I am sending SQL looks like:
sQLUpdateString = "UPDATE Users SET " & updateString & _
" WHERE (UserName='" & userName & "')"
conWrite.Execute(sQLUpdateString)
My script generates updateString automatically and in the case where
it updates the users full name;
updateString = FullName='John O'Connel'
In this case userName = "JohnO"
This normally works fine, (I can update all the other users in my DB
this way), however in cases like this where the surname includes the "
' " the full name in read in as being "John O" then an error because
the "Connel" part still remains and is invalid SQL. I am told that I
should probably use a rule or a constraint to fix this, however SQL is
not really my strong suit, so any pointers on how to go about this
would be greatly appreciated.
Thanks in advance