Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / May 2006

Tip: Looking for answers? Try searching our database.

Problems updating underlying Access database using DataSet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lkororos@gmail.com - 04 May 2006 01:35 GMT
Hi,

here is my problem:

I am writing a form to make some changes in the details of some
employees. I use a combobox to select the Social Security Number and
retrieve the details of a specific employee. So far so good. The
details are retrieved ok. I use the BondingContext.Position =
cmbBox.SelectedIndex to move through the records of the dataset.

The problem is that if I change the details of an employee and then
press the "Update" button that I have (which calls
dataadapter.update()) WITHOUT FIRST MOVING TO ANOTHER RECORD USING THE
COMBOBOX, the changes are not committed to the database (MS Access
database). However, The changes are in the dataset.

Also, if I only change one record without subsequently moving to
another record, the HasChanges property of the DataSet is False. Moving
to another record before pressing the Update button fixes the problem.

Finally, as a piece of extra info, say that I change two records in the
dataset but I don't select a third one before clicking the Update
button, only commits to the database the first change.

Can anyone help me with this? I reckon that it is something rather
simple that is slipping my mind but I don't know what.

Thanks in advance,

Lefteris
Jim Hughes - 04 May 2006 01:41 GMT
Call EndEdit prior to Update

> Hi,
>
[quoted text clipped - 26 lines]
>
> Lefteris
Lefteris Kororos - 04 May 2006 01:56 GMT
Thanks, that worked nicely!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.