🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database.dotnet
Article #577

Re: Determine if a statement is non-SELECT

#577
From: Steven Taylor
Date: Mon, 17 Jan 2005 04:24
13 lines
1677 bytes
"Marc Rohloff [TeamB]" <"on request"> wrote:
>On 13 Jan 2005 20:55:58 -0800, Steven Taylor wrote:
>
>> Is there an easy way to determine whether a certain SQL statement (supplied by a user) is a non-SELECT sql string, or a Stored Procedure?
>> If so then ExecuteNonQuery can be used instead of ExecuteReader for an OleDbCommand to execute the statment.
>
>At the risk of sounding facetious, why don't you compare the first 7
>characters to 'SELECT ' ?
>
>-- 
>Marc Rohloff [TeamB]
>marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID: <41eb3de4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-out2.kabelfoon.nl!83.128.0.10.MISMATCH!newsfeed.kabelfoon.nl!213.218.66.70.MISMATCH!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41e750de$1@newsgroups.borland.com> <et1fvexys0wu$.dlg@marcrohloff.40tude.net>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,92635b97b205b3ed
X-Google-Attributes: gid1effe6,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Steven Taylor" <stjtaylor@hotmail.com>
Sender: "Steven Taylor" <stjtaylor@hotmail.com>
Reply-To: "Steven Taylor" <stjtaylor@hotmail.com>
Subject: Re: Determine if a statement is non-SELECT
Newsgroups: borland.public.delphi.database.dotnet
X-User-Info: 210.9.173.18     
References: <41e750de$1@newsgroups.borland.com> <et1fvexys0wu$.dlg@marcrohloff.40tude.net>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <41eb3de4$1@newsgroups.borland.com>
Date: 16 Jan 2005 20:24:04 -0800
X-Trace: newsgroups.borland.com 1105935844 207.105.83.66 (16 Jan 2005 20:24:04 -0800)
Lines: 14
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-out2.kabelfoon.nl!83.128.0.10.MISMATCH!newsfeed.kabelfoon.nl!213.218.66.70.MISMATCH!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail