Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

prepare sql string

Status
Not open for further replies.

j420exe

MIS
Feb 17, 2002
28
US
The string that I am passing into a function to build a sql statement is "b's"

How can I search the string and find the single tick(s) and then once I find the single tick I can add another single tick to it so the sql statement will not error out when querying an access database?

Thanks in advance!
 
Solved my own problem. Imagine that.

PrepareSQLString =
Replace$(Trim$(Replace$(s, Chr$(0), " ")), "'", "''")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top