https://bugzilla.novell.com/show_bug.cgi?id=381118
Summary: SqlDataReader converts SqlServer2005 bigint value into
Decimal instead of Int64
Product: Mono: Runtime
Version: 1.9.0
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
The following partial code snippet demonstrates the problem. The "DateModified"
value in the SQL database is a bigint. In .NET, sqlValue is an Int64, while in
Mono sqlValue is a Decimal:
System.Data.SqlClient.SqlDataReader rdr;
..
object sqlValue = rdr["DateModified"];
Console.WriteLine(sqlValue.GetType().ToString());
long ticks = (long)sqlValue;
This results in an invalid cast exception in my application under Mono, because
there is an assumption that sqlValue is an Int64. I have worked around the
problem, but it involves some extra type checking.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs