We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dataset Udate with NULL field

Hi all. In the following code how do I update my dtaset with "NULL" when the value of my TextBox17.Text="Null"?? Thank you. Peter '----------------- CODE --------------------------- strConn = ConnectionString() Dim ocon As OleDb.OleDbConnection = New OleDbConnection(strConn) ocon.Open() Dim sql5 As String 'This will be a true Add New Inspection sql5 = "Select * from Inspections" Dim daInspect As New OleDbDataAdapter("Select * from Inspections", ocon) Dim Inspections As New DataSet() daInspect.FillSchema(Inspections, SchemaType.Source, "Inspections") daInspect.Fill(Inspections, "Inspections") Dim tblInspect As New DataTable() tblInspect = Inspections.Tables("Inspections") Dim drI As DataRow drI = tblInspect.NewRow If Not TextBox17.Text = "" Then drI("PropAddress1") = TextBox17.Text tblInspect.Rows.Add(drI) Dim objCommandBuilder As New OleDbCommandBuilder(daInspect) daInspect.Update(Inspections, "Inspections") ocon.Dispose() daInspect.Dispose()

Live Chat Icon For mobile
Up arrow icon