J
JD
I'm not sure which group to send this to>
I have a windows form with a text box that I want to send the data entry to
SQL using a stored procedure.
I add the parameter:
Dim prm as
sqlclient.sqlparameter=sqlcm.Parameters.add("@WaterTemp",Sqldbtype.decimal,9
)
get the value from the text box:
prm.value=me.textbox.text
I execute the stored Procedure:
Sqlcm.ExecuteNonQuery()
I get an error 'Input string was not in right format' and that is because I
do not put a value in the textbox because no data is available.
The SQL table column is set to allow nulls.
I think I need to use DBNull but I don't know how. The ' help' is not very
helpful!
Can anyone please help me?
thanks
I have a windows form with a text box that I want to send the data entry to
SQL using a stored procedure.
I add the parameter:
Dim prm as
sqlclient.sqlparameter=sqlcm.Parameters.add("@WaterTemp",Sqldbtype.decimal,9
)
get the value from the text box:
prm.value=me.textbox.text
I execute the stored Procedure:
Sqlcm.ExecuteNonQuery()
I get an error 'Input string was not in right format' and that is because I
do not put a value in the textbox because no data is available.
The SQL table column is set to allow nulls.
I think I need to use DBNull but I don't know how. The ' help' is not very
helpful!
Can anyone please help me?
thanks