>Randal,
>
>SQLEXEC()?
Yep :^). We're doing a remote update of a MySQL database via SQLEXEC() and
ODBC. Dang. Sorry about not mentioning that we're using ODBC 3.51.
>You have two choices...
>
>1) using bind parameter
>2) escape all "forbidden" characters
PROCEDURE ToSafe(lcText)
RETURN IIF(ISNULL(lcText),"NULL","'"+STRTRAN(STRTRAN(STRTRAN(STRTRAN(STRTRAN(STRTRAN(STRTRAN(STRTRAN(STRTRAN(lcText,;
"\","\\"),CHR(0),"\0"),"'","\'"),'"','\"'),CHR(13),"\n"),CHR(10),"\r"),CHR(9),"\t"),;
"%","\%"),"_","\_")+"'")
Kewl. Thanks for the code snip, Martin. Oh, and BTW, I think that I should
mention that Sameer and I are VFP neophytes/beginners, so sometimes we don't
know what we're doing :^). Hopefully, this will change in the not-too-distant
future :^)
Randall
--
Randall Jouett
Amateur/Ham Radio: AB5NI
I eat spaghetti code out of a bit bucket while sitting at a hash table! Someone
asked me if I needed salt, and I said, "I'm not into encryption." :^)