🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Logic to determine if to use ExecSQL() or Open() ...

#294
From: Arnie
Date: Tue, 27 Jun 2006 13:41
24 lines
1770 bytes
"Vladimir Stefanovic" <antivari@po.sbb.co.yu> wrote in message 
news:44a0eefa@newsgroups.borland.com...
> Hi,
>
> I use BCB6, ADO, MS Access, Jet4.0.
>
> If the user is free to write a query himself, what is the
> best way to find out if to use ExecSQL() or Open()
> command for the execution.
>
> Is it enough to check for the speciffic keyword existence,
> (SELECT, DELETE, ...) like with: StrPos() or similar, or
> I should be aware of something else.
>
> -- 
> Best Regards,
> Vladimir Stefanovic
Looking for "SELECT" at the beginning of the statement should 
suffice in MOST cases.  This avoids finding in statements such as 
"UPDATE ... WHERE x IN (SELECT ...)".

What about stored procs that return a result set?

- Arnie 
Technical Details
Message-ID: <44a134f3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44a0eefa@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,e18a9574d33ec485
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Arnie" <none>
Newsgroups: borland.public.cppbuilder.database.ado
References: <44a0eefa@newsgroups.borland.com>
Subject: Re: Logic to determine if to use ExecSQL() or Open() ...
Date: Tue, 27 Jun 2006 09:41:37 -0400
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 24.151.53.204
Message-ID: <44a134f3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1151415539 24.151.53.204 (27 Jun 2006 06:38:59 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail