Hi,
I have a vb 2005 winforms data application that connects to an Access database...
I am having trouble updating the record with null values so I have entered this code before the update is called...
If Me.txtDate.Text = String.Empty Then
Me.TEnqBindingSource.Current.row.Item("OrderDate") = DBNull.Value
Else
Me.TEnqBindingSource.Current.row.Item("OrderDate") = Me.txtDate.Text
End If
Me.Validate()
Me.TEnqBindingSource.EndEdit()
Debug.Print Me.TEnqTableAdapter.Update(Me.TradeBaseDataSet.tEnq)
When I change the textbox holding the date to "" it updates fine (returns 1 on the debug.print) as long as no other fields have changed. If I change the date to "" and change another field to a different value, the update returns 0 (it didn't update)
Any ideas please?
I have a vb 2005 winforms data application that connects to an Access database...
I am having trouble updating the record with null values so I have entered this code before the update is called...
If Me.txtDate.Text = String.Empty Then
Me.TEnqBindingSource.Current.row.Item("OrderDate") = DBNull.Value
Else
Me.TEnqBindingSource.Current.row.Item("OrderDate") = Me.txtDate.Text
End If
Me.Validate()
Me.TEnqBindingSource.EndEdit()
Debug.Print Me.TEnqTableAdapter.Update(Me.TradeBaseDataSet.tEnq)
When I change the textbox holding the date to "" it updates fine (returns 1 on the debug.print) as long as no other fields have changed. If I change the date to "" and change another field to a different value, the update returns 0 (it didn't update)
Any ideas please?