Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27569

VS 2012 Troubleshooting a VB DataTable "UPDATE" sequence.

$
0
0
I'm at my wit's end troubleshooting a DataTable Update sequence.

A DataBindingSource.Filter is implemented.

The application retrieves the Filtered Binding Source Data Row information and displays it in the selected Textbox's, NumericBox's, DateTimePicker's as is appropriate within a Userform. The Userform is then Hidden. (I've tried it without Hiding the Form as well)

A secondary Userform is opened where the data may be changed and additional data acquired to fill other data columns within the same row.

The retrieved data stored in the Hidden Userform is used to supply the required "Original_Text:= " to complete MyDataTable.Update() sequence.

There are 65 Columns to update within the Data Table.

Code:

Try
MyDataTable.Update(ID:=HiddenForm.NumericBox1.Value, _
 Original_ID:=HiddenForm.NumericBox1.Value, _
              Text:=OpenForm.TextBox2.Text, _
 Original_Text:=HiddenForm.Textbox1.Text, _
              Date:=Now.ToShortDateString, _
 Original_Date:=HiddenForm.OriginalDate.Value)

Catch Ex as Exception
Msgbox("It Didn't Work")
End Try

The DataColumn DataTypes are Varchar(50), Varchar(1000), Date, Numeric(18,0) and NChar(10)
The TextBox.Text Data may be a Combobox, TextBox or Label.
The "ID" is a NumericBox
The "OriginalDate.Value" is a DateTimePicker set for ShortDate.

The Primary Key is identified [ID] in the DataTable Configuration.

I don't get any Catch Exceptions displayed.

I have walked through the VB line by line and manually inserted New and the Original Values into the code to try and identify the hiccup to no avail.

The Table Adapter allows for the "Update" Command to be implemented.

Yet, the DataRow is not updated.

Are there any Settings that I could be overlooking?

Are there any suggestions available to further the troubleshooting?

Thank you for your Assistance.

Viewing all articles
Browse latest Browse all 27569

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>