Hello,
I am using 2.0.1.0 version of Ado.Net provider and I have problems calling a
parametrized stored procedure.

The procedure has several parameters some of which are Integer type. In my
program I add parameters like this:
cmd.Parameters.Add("@myparam", FbDbType.Integer);
and then I set its value to 1. All parameters that are type of Integer have
value 1. However, when I call ExecuteCommand I am getting
InvalidCastException saying "Invalid cast from 'DateTime' to 'Int32'." Here
is stackTrace:
   at System.DateTime.System.IConvertible.ToInt32(IFormatProvider provider)
   at System.Convert.ToInt32(Object value, IFormatProvider provider)
   at FirebirdSql.Data.Common.DbValue.GetInt32()
   at FirebirdSql.Data.Client.Gds.XdrStream.Write(DbField param)
   at FirebirdSql.Data.Client.Gds.XdrStream.Write(Descriptor descriptor)
   at FirebirdSql.Data.Client.Gds.GdsStatement.Execute()
   at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior
behavior, Boolean returnsSet)
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand

So when I looked in the dll using Reflector I found that DbValue.GetInt32()
is called only if parameters type is FbDbType.Integer But all such
parameters have value 1. Why does it thik that it is datetime?

Thanks.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to