By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Mar 16 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You need to check your update statment, it seems you are trying to update
multible rows at the same time.

thank you.

"nvx" <nv*****@hotmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
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

Mar 16 '06 #2

P: n/a
nvx
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

Mar 17 '06 #3

P: n/a
nvx
Solved... VS IDE somehow forgot to create methods Update, Insert and
Delete plus a few other things in DataSet Designer file...

Mar 21 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.