Writing to a text box, comminiting chagnes to a DB

J

Jason

Hello

I've got simple form with a datagrid and a text box, and I'm binding to a
simple MS Access DB this is done in C#
The textbox is getting it's data from a field in my database and that field
is of type memo, and I do have the text box bound to my data binding source,
and this does work.

so in my c# app, how can I save the text I type into the textbox into my DB?
 
N

Nicholas Paldino [.NET/C# MVP]

Jason,

You aren't binding to a database, rather, your textbox is bound to the
in memory representation of the value from the database (most likely, a data
set).

What you need to do is after you determine that the textbox has been
changed (to warrant the info being saved), you need to take the updated data
set, and pass it to a data adapter which will then update the database.

Hope this helps.
 

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

Top