R
roger.breton
Guest
I have a series of Textboxes in my application which are not bound to any Data source.
To save a new record, I use the Add row method (I tried using the Datatable.Add row method to no avail).
At the time of saving, this is the code I use:
Dim NewRow = Me.myDataSet.Color.NewRow()
And then I proceed to "transfer" the data from my Textboxes to each Data Row Columns this way:
NewRow("VALUE_X") = textBox_X.Text
NewRow("VALUE_Y") = textbox_Y.Text
NewRow("VALUE_Z") = textbox_Z.Text
This is followed by a bunch of these kinds of columns:
NewRow("nm380") = textbox_380.Text
NewRow("nm390") = textbox_390.Text
NewRow("nm400") = textbox_400.Text
...
NewRow("nm730") = textbox_730.Text
There are 32 such "nmXXX" in myDataSet.Color table in all.
As soon as I issue this instruction Me.myDataSet.Color.Add(NewRow), all bets are off!
For some "reason" only the TextBoxes with these "nmXXX" column names becomes "0", all of a sudden, in the interface, but not the VALUE_X, Y and Z TextBoxes. Those remain the same. Here is a screen capture which document this behavior :
In the Dataset, everyone of those columns 'System.Single' and in the SQL Table, everyone of those columns are shown as 'Real'.
What could I possibly do wrong?
Continue reading...
To save a new record, I use the Add row method (I tried using the Datatable.Add row method to no avail).
At the time of saving, this is the code I use:
Dim NewRow = Me.myDataSet.Color.NewRow()
And then I proceed to "transfer" the data from my Textboxes to each Data Row Columns this way:
NewRow("VALUE_X") = textBox_X.Text
NewRow("VALUE_Y") = textbox_Y.Text
NewRow("VALUE_Z") = textbox_Z.Text
This is followed by a bunch of these kinds of columns:
NewRow("nm380") = textbox_380.Text
NewRow("nm390") = textbox_390.Text
NewRow("nm400") = textbox_400.Text
...
NewRow("nm730") = textbox_730.Text
There are 32 such "nmXXX" in myDataSet.Color table in all.
As soon as I issue this instruction Me.myDataSet.Color.Add(NewRow), all bets are off!
For some "reason" only the TextBoxes with these "nmXXX" column names becomes "0", all of a sudden, in the interface, but not the VALUE_X, Y and Z TextBoxes. Those remain the same. Here is a screen capture which document this behavior :
In the Dataset, everyone of those columns 'System.Single' and in the SQL Table, everyone of those columns are shown as 'Real'.
What could I possibly do wrong?
Continue reading...