How does one update two tables with the DataSet changes

G

Guest

I am new to database work. I have a very simple database with only two
tables linked by a 1:1 relationship. I've read the tables contents into a
dataset and bound the two tables to textbox controls on a form. Using a
BindingNavigator I can cursor through the data. However, I don't understand
how to properly update new data entered within my form. I was able to get
the parent table to update correctly but never the child table. Fact is, I
keep losing the new child data entered into my form as I cursor through the
othter entries. Can someone point me to a clear example of how to update
Access tables with changes made to both the parent and linked child table?
 
J

Jeffrey Tan[MSFT]

Hi Steve,

Thanks for your post!

Do you use BindingNavigator to change the current index of the parent table
databinding? Normally, each datasource will have each own current binding
index, so your child table and parent table will have a different binding
index.

If you setup the databinding correct, the .Net winform code will take care
of the datasource updating, you should not have such problem.

Is it possible for you to create a little sample project to demonstrate
your problem? For simplicity's sake, you'd better get rid of the database
dependency in your sample project and fill the datasource tables
programmatically with .Net code.

You may attach the sample project in the further reply. Thanks!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

I'll try to put something together. In the mean time, do you know of any
examples that demonstrate what I'm trying to do?
 
J

Jeffrey Tan[MSFT]

Hi Steve,

Ok, I will wait for your sample project.

Currently, I can not find a specific sample based on your requirement, so I
want to work with you on it to find out the problem. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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