B
Benny Dein
Hi
A newbie question regarding using update function on sqldataadapter:
I have created a connection, a dataadapter and a dataset on my webform.
I have put a texbox on my webform to show a value from a certain field on a
selected record.
The textbox is databound to my datatable and shows as wanted the value in
the sql selected row.
Now I want to update the value by changing its value on the webform and
submit the form.
In the background code I do an update on the dataadapter, but the the new
value are not written to the database.
It seems as I missed something.
To load the data to my textbox I use the databind command.
Do I have to execute another method to read the value from the textbox (and
other controls) back to the datatable or how do I do that?
Of course I could read the value directly from the textbox and put it into
the datarow in background but it seems strange that it should be necesarry
to move the values from the webform one by one, since they are databound and
should know where to put the values, when the form is submitted.
So what am I missing here?
Thanks in advance!
Benny
A newbie question regarding using update function on sqldataadapter:
I have created a connection, a dataadapter and a dataset on my webform.
I have put a texbox on my webform to show a value from a certain field on a
selected record.
The textbox is databound to my datatable and shows as wanted the value in
the sql selected row.
Now I want to update the value by changing its value on the webform and
submit the form.
In the background code I do an update on the dataadapter, but the the new
value are not written to the database.
It seems as I missed something.
To load the data to my textbox I use the databind command.
Do I have to execute another method to read the value from the textbox (and
other controls) back to the datatable or how do I do that?
Of course I could read the value directly from the textbox and put it into
the datarow in background but it seems strange that it should be necesarry
to move the values from the webform one by one, since they are databound and
should know where to put the values, when the form is submitted.
So what am I missing here?
Thanks in advance!
Benny