Hi there,
I am designing and developing a data layer for a Compact
Framework application that connects to a SQL Server 2000
on our (wireless) network.
Things work pretty OK: I can connect and retrieve data
etc.
However, I am trying to use the Microsoft Application
Blocks for DataAccess. They compile fine against the
Compact Framework, but as soon as I use a parameter to
invoke a Stored Procedure, its type is changed to
sql_variant, causing the following error:
"Implicit conversion from data type sql_variant to int is
not allowed. Use the CONVERT function to run this query."
Any idea how this is possible? I define them correctly,
AFAIK:
SqlParameter[] arParms = new SqlParameter[2];
arParms[0] = new SqlParameter("@ID", SqlDbType.Int);
arParms[0].Direction = ParameterDirection.Input;
arParms[0].Value = 33;
arParms[1] = new SqlParameter("@Description",
SqlDbType.VarChar);
arParms[1].Direction = ParameterDirection.Input;
arParms[1].Size = 50;
arParms[1].Value = "Test";
The Application Block runs fine on the .NET Framework....
Suggestions, ideas etc are more than welcome.......
Regards,
Imar
|