Sample code......
With DataSetLocationsForm1.tblLocations(0)
.WaterDischargeCost = txtWaterDischargeCost.Text
.MoreFields = txtOtherTextboxes.Text
End With
SqlDataAdapter1.Update(DataSetLocationsForm1)
The WaterDischargeCost field in the database is an type real. If they blank
out the text box and click the SAVE button on an existing record I get an
error "Can't convert NULL to integer"
I want to put a null value back into the database field
How do I do this?
Thanks
SqlDataAdapter1.Update(DataSetLocationsForm1)
"Marina" <so*****@nospam.com> wrote in message
news:eY**************@TK2MSFTNGP09.phx.gbl...
Would be helpful if you showed us the code running that is causing the
error...
"Craig" <No****@hotmail.com> wrote in message
news:uh**************@tk2msftngp13.phx.gbl...I have a text box on a web form that a user enters a number in.
If they blank out the text box then I want to put a null value back into
the database field.
I want to return the value to NULL like txtWaterDischargeRate =
System.DBNull.Value instead of Nothing but I get an error
Can't convert NULL to integer
How can I enter a null in the database field on MS SQL Server?
Thanks