Realgar

Realgar

  • NA
  • 22
  • 0

Using dataadapter.fill twice on the same row to fill it from 2 sources...

Nov 7 2005 3:56 PM

I am creating a form that will add/update/get a single row from a rdb oracle database and I want to get/insert/update rows using a DataSet.

The problem is, when adding a new row I have for example 4 textboxes that I bind to the DataSet.

Each textbox binding to its own column from the dataset.

When the user enter data into textbox1 and press enter, I want to look in the database for another info and put it into textbox2 (readonly), and have it all in one row on the dataset.

Then the user enter data into textbox3 and press enter, and I want to get data from database and put it into textbox4, the problem is right here, if I use dataadapter.fill on the dataset, it will add the data into new row 2 instead of adding the data into row 1 to complete row 1.

So the dataset looks like this:

Column 1 Column 2 Column 3 Column 4
hasdata_ hasdata_ null____ null_____ <- row 1
null_____ null_____ hasdata hasdata_ <- row 2

Is there any way I can use dataadapter.fill to insert data into row 1 ?

Thanks in advance for answers.