Binding a TextBox to a particular cell of an Access database table

  • Thread starter Thread starter nvx
  • Start date Start date
N

nvx

Hello everyone...

Just for the record, I'm a newbie to this data binding thing... In my
C# application I need to bind a cell of an Access database table to a
multiline TextBox. How should I do it?

I've tried to bind the TextBox using the VS IDE (which ended up in
binding to a table column). This was perfect until I used the Update
command. Then an exception was thrown, telling me, that to update a
database it needs to have a DataRow collection of changed rows. Anyone
familiar with this?

The content of the first cell of the column is displayed correctly in
the TextBox. Any other cell filled with data is ignored (I don't see
that as a problem, because I'm interested in viewing and editing of the
first row of the first column only).

Is there a way how to bind the particular cell to a TextBox?

I'm missing something here for sure. Binding of a database to a
DataGridView and its updating is not a problem for me.

Any advice or pointers how to do the desired thing would be
appreciated.

Regards
nvx
 
You need to check your update statment, it seems you are trying to update
multible rows at the same time.

thank you.
 
Thank you very much for your reply... I'll look at it. Maybe there is a
problem with VS IDE and it doesn't set the update command correctly
when binding TextBoxes using the Wizard...

Regards
nvx
 
Solved... VS IDE somehow forgot to create methods Update, Insert and
Delete plus a few other things in DataSet Designer file...
 
Back
Top