🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1182

Re: question about '

#1182
From: Daniele Borini
Date: Fri, 22 Oct 2004 16:46
27 lines
1992 bytes
10x a lot i've replaced ' with \' and it works but i've made a loop and, 
for huge data, it could slow down my app. i think u're suggestion could 
improve my app.. and my skill too.
many thanx!!

Steve wrote:

> 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: <41793972@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <415c78d9@newsgroups.borland.com> <41782fc6$1@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
Date: Fri, 22 Oct 2004 18:46:41 +0200
From: Daniele Borini <borini@infinito.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: question about '
References: <415c78d9@newsgroups.borland.com> <41782fc6$1@newsgroups.borland.com>
In-Reply-To: <41782fc6$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.94.232.245
Message-ID: <41793972@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1098463602 62.94.232.245 (22 Oct 2004 09:46:42 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail