R
RN1
How do I insert NULL values in a SQL Server DB table in a column whose
datatype is int? This is what I am trying currently (in the
UpdateCommand event function of a DataGrid):
----------------------------
Dim strSQL As String
Dim objErrorPercentage As Object
If (CType(ea.Item.Cells(8).Controls(0), TextBox).Text = "") Then
objErrorPercentage = DBNull.Value
Else
objErrorPercentage = CType(ea.Item.Cells(8).Controls(0),
TextBox).Text
End If
strSQL = "UPDATE Table1 SET.......ErrorPerc = " & objErrorPercentage &
".....WHERE....."
datatype is int? This is what I am trying currently (in the
UpdateCommand event function of a DataGrid):
----------------------------
Dim strSQL As String
Dim objErrorPercentage As Object
If (CType(ea.Item.Cells(8).Controls(0), TextBox).Text = "") Then
objErrorPercentage = DBNull.Value
Else
objErrorPercentage = CType(ea.Item.Cells(8).Controls(0),
TextBox).Text
End If
strSQL = "UPDATE Table1 SET.......ErrorPerc = " & objErrorPercentage &
".....WHERE....."