HasRows bug

HasRows bug

Postby 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.
archie
 
Posts: 9
Joined: Wed 11 Jul 2007 14:42

Postby Alexey » Thu 12 Jul 2007 10:47

I've reproduced the problem with HasRows property.
Look forward to the next build.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby 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...
archie
 
Posts: 9
Joined: Wed 11 Jul 2007 14:42

Postby Alexey » Thu 12 Jul 2007 12:48

Hopefully, in the beginning of the next week.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby archie » Thu 12 Jul 2007 12:52

Sounds good, looking forward to it, thanks!
archie
 
Posts: 9
Joined: Wed 11 Jul 2007 14:42


Return to dotConnect Universal