Problem with HasRows on FbDataReader
------------------------------------

                 Key: DNET-305
                 URL: http://tracker.firebirdsql.org/browse/DNET-305
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 2.5.1
         Environment: XP Pro, FB ODS structure 11.1, Dialect 3, Firebird 
ADO.NET Driver 2.5.1.0
            Reporter: Steven Harris
            Assignee: Jiri Cincura


Should the HasRows property return true if a datareader has no rows?

I can execute a query such as "select cus_id, cus_code, cus_name from customer 
where cus_id = -1" and although there is no row with a cus_id of -1, the 
HasRows property returns true.

Of course, when I do the dr.Read() and then dr.GetString(1) an exception occurs:
"There are no data to read"

I thought the HasRows property should indicate if there are rows to be read. 
Otherwise the only way I can use it is to set up a try / catch structure which 
seems incorrect.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to