Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=76543 --- shadow/76543 2006-01-02 15:47:04.000000000 -0500 +++ shadow/76543.tmp.4121 2006-01-02 16:31:30.000000000 -0500 @@ -55,6 +55,16 @@ ------- Additional Comments From [EMAIL PROTECTED] 2006-01-02 15:47 ------- Sqlite doesn't track the types of expressions, and there's no way to know that the returned value, a string or long, was supposed to be an integer. You should use GetInt32() on the data reader to ensure you get something of the right type. + +------- Additional Comments From [EMAIL PROTECTED] 2006-01-02 16:31 ------- +A boxed value type can only be unboxed to it's original type. + +If you know that the object that ExecuteScalar returns is a boxed +long you can do the following: + +int rowsLeft = (int)(long)cmd.ExecuteScalar(); + +This is faster than calling Convert.ToInt32(object). _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
