Article View: borland.public.cppbuilder.database.ado
Article #1179Re: question about '
From: Steve
Date: Thu, 21 Oct 2004 21:53
Date: Thu, 21 Oct 2004 21:53
18 lines
1452 bytes
1452 bytes
Drop this function into your code, call this whenever you need it.
String TfrmWhatever::ReplaceQuotes(String S)
{
String s = StringReplace(S,"'","''",TReplaceFlags()<<rfReplaceAll);
return s;
}
Daniele Borini <borini@infinito.it> wrote:
>hi averybody,
>maybe it's the right place, but i've got this problem:
>when i need to build a query which inserts or updates a table with
>string fields i use ' to indicate string fields, but i've got errors
>when the string contains ' itself e.g. 'lil'devil' causes an error, i
>tried to replace ' with its ASCII value but it's the same.. how could i do?
>I'm using ADO+BCB6+ACCESS DB.
>TIA Dan
Technical Details
Message-ID:
<41782fc6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mailReferences:
<415c78d9@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,797d322221a52654 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Steve" <sportock@hotmail.com> Sender: "Steve" <sportock@hotmail.com> Reply-To: "Steve" <sportock@hotmail.com> Subject: Re: question about ' Newsgroups: borland.public.cppbuilder.database.ado X-User-Info: 24.178.50.100 References: <415c78d9@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <41782fc6$1@newsgroups.borland.com> Date: 21 Oct 2004 14:53:10 -0700 X-Trace: newsgroups.borland.com 1098395590 207.105.83.66 (21 Oct 2004 14:53:10 -0700) Lines: 19 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail