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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dataset Udate with NULL field

Thread ID:




8701 Nov 17,2003 05:38 PM UTC WinForms 0
Tags: FAQ
Asked On November 17, 2003 05:38 PM UTC

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()


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon