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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apostrophe escape in SQL statement

Status
Not open for further replies.

Kenny62

Programmer
Mar 3, 2004
54
GB
HI - how do you escape the apostrophe and quote symbol in a text field when used in a sql statement.

i.e. SELECT name FROM mytable WHERE names='qwerty's'

Will this escape sequence work against an Access DB?
Thanks in advance.

Ken
 
You can use the replace function which does same thing as suggested by DBomrrsm.

fieldname=Replace(fieldname,"'","''")

Thanks

VJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top