apostrophe in a string used in a query to build a recordset

BigJimSlade

Registered User.
Local time
Today, 18:26
Joined
Oct 11, 2000
Messages
173
Hey, Big Jim here:

Let's say for example I have a setup where I am using this string

strTest = "Doug's"

as a recordset parameter. This will of course cause an error if the SQL was written as:

Select * From Table Where Name = '" & strTest & "';"

What oh what do I do about that apostrophe in strTest that is messing up my sql?

Thanks in advance,

Big Jim
 

Users who are viewing this thread

Back
Top Bottom