Bug #6730 Cast failure when using GetInt32 on a unsigned int field
Submitted: 20 Nov 2004 16:39 Modified: 31 Jan 2005 21:19
Reporter: Oliver Kofoed Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version: OS:
Assigned to: Reggie Burnett CPU Architecture:Any

[20 Nov 2004 16:39] Oliver Kofoed
Description:
When using MySQLDataReader.GetInt32(idx) on a field that is an unsigned int, it fails with an "invalid cast"

How to repeat:
see description.

Suggested fix:
a bit of debugging reveals that GetFieldValue acctually returns a MySql.Data.Types.MySqlUInt32 and not a MySql.Data.Types.MySqlInt32 as GetInt32 tries to cast it to.

:D
[20 Nov 2004 19:16] Oliver Kofoed
Ups -- my bad..

found GetUint32...

sorry!