Article View: comp.lang.perl.misc
Article #68Re: Another ODBC/SQL question
From: Mark D. Mills
Date: Mon, 28 Oct 1996 00:00
Date: Mon, 28 Oct 1996 00:00
25 lines
1549 bytes
1549 bytes
On Fri, 25 Oct 1996 09:08:54 -0400, Glenn Stanton <gms@lucent.com> wrote: >Yossi Konijn wrote: >>> Oh, and while on the subject, does anyone know what >>> escape sequence I should use to send a single-quote >>> to a text field? I'm trying to type 'Can't' but the >>> quotes are confusing Access. >it seems to be a real problem for the ODBC "JetEngine". >$somevar =~ s/\'/\&\#146\;/g; >obviously this isn't the solution for non-WWW results. I may have mentioned this in a prior post. From what I've seen of SQL it allows you to quote out the characters the same way C, shells, and perl do. Backslash 'em. I use: $somevar =~ s/\'/\\\'/g; or $somevar =~ s/\'/\\\\\\\'/g; depending on how many times it is interpeted. (actually $somevar =~ s#\'#\\\'#g; will prevent blindness :> ) HTH Mark <insert sig <insert 'don't sue my boss' disclaimer here> here>
Technical Details
Message-ID:
<551af5$3vk@ha2.ntr.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<54nomb$j88@news.NetVision.net.il> <32719a0a.23151825@news.netvision.net.il> <3270BBE6.5390@lucent.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f591,5d3951a8a6107760 X-Google-Attributes: gid10f591,public X-Google-Thread: f6611,5d3951a8a6107760 X-Google-Attributes: gidf6611,public X-Google-Thread: fa0ae,5d3951a8a6107760 X-Google-Attributes: gidfa0ae,public From: mark@ntr.net (Mark D. Mills) Subject: Re: Another ODBC/SQL question Date: 1996/10/28 Message-ID: <551af5$3vk@ha2.ntr.net> X-Deja-AN: 192656727 references: <54nomb$j88@news.NetVision.net.il> <32719a0a.23151825@news.netvision.net.il> <3270BBE6.5390@lucent.com> organization: NTR.NET Corporation newsgroups: comp.lang.perl.misc,comp.lang.perl.modules,bit.databases.mssql-l