🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
3 messages
3 total messages Started by Vladimir Stefanovic Tue, 27 Jun 2006 08:40
Logic to determine if to use ExecSQL() or Open() ...
#292
Author: Vladimir Stefanovic
Date: Tue, 27 Jun 2006 08:40
18 lines
1243 bytes
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 
Re: Logic to determine if to use ExecSQL() or Open() ...
#294
Author: 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 
Re: Logic to determine if to use ExecSQL() or Open() ...
#295
Author: Vladimir Stefanovic
Date: Tue, 27 Jun 2006 13:47
12 lines
1214 bytes
> What about stored procs that return a result set?

Not relevant in this case.

Thank's for the answer.




-- 
Best Regards,
Vladimir Stefanovic 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads