<html><div style='background-color:'><DIV>
<P><BR>You could create a constant like </P>
<P>const QUOTES =""""<BR>for however many ticks you want</P></DIV>
<DIV></DIV><BR><BR><BR>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" color=#6666ff size=2><EM>"Things are only free to the extent that you don't pay for them." </EM></FONT></DIV>
<DIV><FONT color=#33cc66></FONT></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>>From: "Michael Tucker" <MTUCKER@MYREALBOX.COM>
<DIV></DIV>>Reply-To: accessd@databaseadvisors.com
<DIV></DIV>>To: <ACCESSD@DATABASEADVISORS.COM>
<DIV></DIV>>Subject: RE: [AccessD] Function for "scrubbing" strings before inserting theminto SQL statements?
<DIV></DIV>>Date: Fri, 2 May 2003 15:10:21 -0400
<DIV></DIV>>
<DIV></DIV>>Thanks for the response. My brain is a little fuzzy on this, all these
<DIV></DIV>>quotation marks are turning my eyes to mush...
<DIV></DIV>>
<DIV></DIV>>Replace (mystring, """", """""")
<DIV></DIV>>
<DIV></DIV>>Is this what I'm looking for or is there a better way using chr codes and
<DIV></DIV>>what not?
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: accessd-bounces@databaseadvisors.com
<DIV></DIV>>[mailto:accessd-bounces@databaseadvisors.com] On Behalf Of Drew Wutka
<DIV></DIV>>Sent: Friday, May 02, 2003 12:08 PM
<DIV></DIV>>To: 'accessd@databaseadvisors.com'
<DIV></DIV>>
<DIV></DIV>>Use the replace function, to replace all double quotes, with two double
<DIV></DIV>>quotes.
<DIV></DIV>>
<DIV></DIV>>Drew
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: Michael Tucker [mailto:mtucker@myrealbox.com]
<DIV></DIV>>Sent: Friday, May 02, 2003 10:47 AM
<DIV></DIV>>To: accessd@databaseadvisors.com
<DIV></DIV>>Subject: [AccessD] Function for "scrubbing" strings before inserting them
<DIV></DIV>>into SQL statements?
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Hi everyone,
<DIV></DIV>>
<DIV></DIV>>I'm sure everybody has faced this situation, but I can't seem to figure out
<DIV></DIV>>an elegant solution. I have a webpage interface to an Access database where
<DIV></DIV>>users can enter notes on various things. Of course the user may enter
<DIV></DIV>>apostrophes or quotation marks in these notes, but of course that sends my
<DIV></DIV>>SQL statement into a tizzy. A sample of my SQL statement...
<DIV></DIV>>
<DIV></DIV>>strSQL = "INSERT INTO tblEmployeeMonthlyTask ([TaskDescription]) VALUES "
<DIV></DIV>>strSQL = strSQL & "('" & Request.Form("txtTaskDescription") & "')"
<DIV></DIV>>
<DIV></DIV>>Is there a function that will convert my string so that it usable inside of
<DIV></DIV>>this SQL statement even if it contains apostrophes and quotes?
<DIV></DIV>>
<DIV></DIV>>Thank you.
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV></div><br clear=all><hr>STOP MORE SPAM with <a href="http://g.msn.com/8HMHENUS/2728">the new MSN 8</a> and get 2 months FREE*</html>