Use sqldataadapter to update from databound textbox

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top