[IronPython] Fwd: [DB-SIG] How can I reliably detect whether an SQL statement is a Query?

Lukas Cenovsky cenovsky at bakalari.cz
Tue Aug 3 22:17:11 CEST 2010

  On 3.8.2010 1:24, Vernon Cole wrote:
> What are the consequences of using ExecuteReader() when there is
> nothing to read? If none, i.e. you get an empty set of results, then I
> would say to use that all the time, and don't bother to examine your
> SQL at all.

I think ExecuteReader should work for everything. I use only 
ExecuteReader in my private tool (but I do not use stored procedures).

You will have a bigger problem with ADO.NET than this. According to the 
Python dbapi specification, you can have as many cursors per connection 
as you want. You can have many cursors in ADO.NET too, but you can have 
only one SqlDataReader per connections which makes several cursors per 
connection useless.

-- Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100803/b69a546a/attachment.html>

More information about the Ironpython-users mailing list