HasRows bug

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
archie
Posts: 9
Joined: Wed 11 Jul 2007 14:42

HasRows bug

Post by archie » Thu 12 Jul 2007 09:56

Hi,

We're experiencing problems when using the UniDataReader.HasRows property. It seems to always return true even though there is no data present. The same goes for UniDataReader.Read() which returns true even when no records have been returned.

We have tested this with both SQL Server and MYSQL providers.

Here is an example with a SQL query which deliberately returns no data:

Code: Select all

string query = "SELECT * FROM TBL_ORG WHERE ORG_CODE='FOOBAR'";

UniDataReader reader = command.ExecuteReader();

if (reader.HasRows) { // <-- returns true even without data
  if (reader.Read()) { // <-- also returns true 
    reader.GetValue(0); // <-- now yields InvalidOperationException!
  }
}
Our CoreLab.UniDirect assembly version is 2.5.7.0.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 12 Jul 2007 10:47

I've reproduced the problem with HasRows property.
Look forward to the next build.

archie
Posts: 9
Joined: Wed 11 Jul 2007 14:42

Post by archie » Thu 12 Jul 2007 10:57

Great. When will this next build be released? Our implementation (migration from native data providers) and testing pretty much depends on this functionality...

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 12 Jul 2007 12:48

Hopefully, in the beginning of the next week.

archie
Posts: 9
Joined: Wed 11 Jul 2007 14:42

Post by archie » Thu 12 Jul 2007 12:52

Sounds good, looking forward to it, thanks!

Post Reply