G
Guest
Hi there
I have a column of type Money in a database table, the column is not mandatory and so allows nulls...in my code when i try to insert into that table, i check if the user has entered a value for the money column and if not, i pass in a sqlparameter with a value of DBNull.Value
However, i get a "implicit conversion from data type nvarchar to money" error when i try to pass DBNull.Value in. So..
...Why is it that I can't pass DBNull.Value to a column of type Money which allows nulls in SQL Server
...And if i can't do this, what am i suppossed to pass in the place of DBNull.Value
Cheers
I have a column of type Money in a database table, the column is not mandatory and so allows nulls...in my code when i try to insert into that table, i check if the user has entered a value for the money column and if not, i pass in a sqlparameter with a value of DBNull.Value
However, i get a "implicit conversion from data type nvarchar to money" error when i try to pass DBNull.Value in. So..
...Why is it that I can't pass DBNull.Value to a column of type Money which allows nulls in SQL Server
...And if i can't do this, what am i suppossed to pass in the place of DBNull.Value
Cheers