R
Robert Bouillon
I'm using abstract interfaces to implement my business solution, and can't
seem to find a way to pass SmallMoney to my stored procedure without casting
up to a SqlDataParameter.
I've tried DbType.Decimal, DbType.Currency, and DbType.Double.
conn.Open();
cmd = conn.CreateCommand();
cmd.CommandText = "MyProc";
cmd.CommandType = CommandType.StoredProcedure;
{...}
IDataParameter pqty = cmd.CreateParameter();
pqty.ParameterName = "@Quantity";
pqty.DbType = DbType.Currenccy;
{...}
cmd.Parameters.Add(pqty);
s.Add(ppolldate);
cmd.Prepare();
{...}
cmd.ExecuteNonQuery(); //<-- Code breaks here.
I get the infamous System Error with the following Inner Exception:
"Error converting data type money to smallmoney."
Please Help. Thanks.
--ROBERT
seem to find a way to pass SmallMoney to my stored procedure without casting
up to a SqlDataParameter.
I've tried DbType.Decimal, DbType.Currency, and DbType.Double.
conn.Open();
cmd = conn.CreateCommand();
cmd.CommandText = "MyProc";
cmd.CommandType = CommandType.StoredProcedure;
{...}
IDataParameter pqty = cmd.CreateParameter();
pqty.ParameterName = "@Quantity";
pqty.DbType = DbType.Currenccy;
{...}
cmd.Parameters.Add(pqty);
s.Add(ppolldate);
cmd.Prepare();
{...}
cmd.ExecuteNonQuery(); //<-- Code breaks here.
I get the infamous System Error with the following Inner Exception:
"Error converting data type money to smallmoney."
Please Help. Thanks.
--ROBERT