S
Scott M.
How do I set a value to DBNull so that it will pass into SQL Server without
throwing an error.
The field type in SQL is "Time" and nulls are allowed in the field. I have
a textbox that may, or may not, have a time value in it. If it does, there
is no problem, but if it doesn't then I must set the SQL field to a null
vaule, but in VB.NET, you use DBNull and can't assign that value by x =
DBNull.
I need to be able to do this because the SQL table may have had a time in it
already and if the user passes an empty string, that means they wish to
remove the time from the SQL table (therefore setting it to <NULL>).
Thanks!
throwing an error.
The field type in SQL is "Time" and nulls are allowed in the field. I have
a textbox that may, or may not, have a time value in it. If it does, there
is no problem, but if it doesn't then I must set the SQL field to a null
vaule, but in VB.NET, you use DBNull and can't assign that value by x =
DBNull.
I need to be able to do this because the SQL table may have had a time in it
already and if the user passes an empty string, that means they wish to
remove the time from the SQL table (therefore setting it to <NULL>).
Thanks!