bound textbox

G

Guest

Hi

I am using the ADO.NET OoledbConnection, oledbDataAdabter and a Typed
oledbDataSet to access data from an MS Access db using the Jet 4 provider in
a VS.NET 2003 Windows Forms project on XP Pro Sp2.

I simply have 3 bound textboxes on a form. A button which fills the dataset,
a couple of navigation buttons which use the CurrencyManager Position
property to scroll through the records and a Save button which calls the
DataAdapter.Update method to send the updates to the database.

The database is only updated if the current record is moved off first before
the Save button is clicked. Otherwise the changes are not saved to the
database.

I would be very greatful if someone could advise me on this.
 
M

Miha Markic [MVP C#]

Hi,

TLWood said:
Hi

I am using the ADO.NET OoledbConnection, oledbDataAdabter and a Typed
oledbDataSet

Nah, you are using typed dataset (without oledb prefix).

to access data from an MS Access db using the Jet 4 provider in
a VS.NET 2003 Windows Forms project on XP Pro Sp2.

I simply have 3 bound textboxes on a form. A button which fills the
dataset,
a couple of navigation buttons which use the CurrencyManager Position
property to scroll through the records and a Save button which calls the
DataAdapter.Update method to send the updates to the database.

The database is only updated if the current record is moved off first
before
the Save button is clicked. Otherwise the changes are not saved to the
database.

I would be very greatful if someone could advise me on this.

CurrencyManager.EndCurrentEdit() should do the trick.
 
G

Guest

Thanks Miha
Yes the End CurrentEdit did the trick - and you noticed I got carried away
with the oledb prefixes - well spotted!
 

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