I have a form and stored procedure that inserts the data from the form. It works fine except that if a field isn\'t filled in it doesn\'t insert a NULL
into SQL
Dim TempStr As String
TempStr= "spPersonalDetailsInsert"
TempStr = TempStr.Replace("''", "null")
cmdInsert.CommandText = TempStr
Now No Need to use
If pd_first_name.Text = "" Then
Response.Write("NULL")
address1.Value = DBNull.Value
Else
Response.Write("NOT NULL")
address1.Value = pd_address1.Text
End If
Hope this might be Helpful