[Mono-devel-list] Patch for Mono returns bigint as decimal in SqlClient
Kornél Pál
kornelpal at hotmail.com
Fri May 13 18:30:39 EDT 2005
Hi,
The bug is reported very often:
http://bugzilla.ximian.com/show_bug.cgi?id=53169
http://bugzilla.ximian.com/show_bug.cgi?id=62390
http://bugzilla.ximian.com/show_bug.cgi?id=69768
http://bugzilla.ximian.com/show_bug.cgi?id=74856
This means that this should be corrected.
The problem is that Mono uses TDS 7.0 and it returns bigint as
decimal(19,0).
This could be solved by implementing a TDS 8.0 client but it requires
time...:)
The bug reports pointed out that the problem occurs when using SqlDataReader
with typed result processing to get the best performance.
Bigint should be get using GetSqlInt64 or GetInt64 but on Mono it isn't
Int64.
I attached a patch that works around the limitation of TDS 7.0 by enabling
GetSqlInt64 and GetInt64 on decimals that can be bigint (the original type
cannot be determined).
If you think this is a good solution please post it to SVN otherwise pleas
comment the code.
Sincerely,
Kornél
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SqlDataReader.diff
Type: application/octet-stream
Size: 1136 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050514/75525bc0/attachment.obj
More information about the Mono-devel-list
mailing list