hello,.. I have a problem with an sql statement and the insert into command.
say the string I want to insert is THAI'S POST
well since it has a ', how do you make it work with sql without making the string a variable? any suggestions?
thanks,
Thai
Printable View
hello,.. I have a problem with an sql statement and the insert into command.
say the string I want to insert is THAI'S POST
well since it has a ', how do you make it work with sql without making the string a variable? any suggestions?
thanks,
Thai
Use chr(34) instead of '
sStr = "THAI" & chr(34) & "S POST"
When dealing with SQL in the SQL server Enterprise manager you double up the single quote. For example:
select * from table where text like '%''%'
will get you any instance of a single quote in the field.