I am working with an Access database, and when I save a blank or null value to a memo field it gives an error. I had a similar problem with saving to a text field, however I was able to resolve that by changing the 'Allow Zero Length' field in access to 'Yes'. The same does not fix the memo field problem, but changing the memo field to a text field will allow the program to save the 'null' value.
Below is my code. The message I get (when the field is a memo field) is
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll"
Dim cb As New OleDb.OleDbCommandBuilder(DB.da_Assets)
DB.ds_Assets.Tables("assets_Data").Rows(inc_Assets).Item(0) = cboAssetName.Text
DB.ds_Assets.Tables("assets_Data").Rows(inc_Assets).Item(1) = cboAssetType.Text
DB.ds_Assets.Tables("assets_Data").Rows(inc_Assets).Item(8) = txtAssetNotes.Text
DB.da_Assets.Update(DB.ds_Assets, "assets_Data")
any ideas
Below is my code. The message I get (when the field is a memo field) is
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll"
Dim cb As New OleDb.OleDbCommandBuilder(DB.da_Assets)
DB.ds_Assets.Tables("assets_Data").Rows(inc_Assets).Item(0) = cboAssetName.Text
DB.ds_Assets.Tables("assets_Data").Rows(inc_Assets).Item(1) = cboAssetType.Text
DB.ds_Assets.Tables("assets_Data").Rows(inc_Assets).Item(8) = txtAssetNotes.Text
DB.da_Assets.Update(DB.ds_Assets, "assets_Data")
any ideas