I cannot see anything obviously wrong with the code. So see if this rings any bells
http://www.experts-exchang
Roger
Main Topics
Browse All TopicsExperts: I'm trying to take advantage of VS2005 bound controls... I'm binding 2 different datatables (same dataset) to text boxes on a form. Both tables basically contain one record ... Application filled by ApplicationID and Employee filled by EmployeeID. I allow the user to change the fields and then click "Save". It seems to update the Dataset (temporarily) ... in fact I can close the form and reopen it and the changes are there... BUT when I close down the application and run it again I discover that the DATABASE was not changed. I have to be missing a step. I'm using .update method of the tableadapter... Summary of code below
'--- Fill the tableadapters on form load like this
' Application - Should be passed on edit mode
Me.ApplicationTableAdapter
' Employee - Should be passed on edit mode
Me.EmployeeTableAdapter.Fi
'-- User makes changs to the bound text boxes
'-- User Clicks "Apply" (Save)
' End edit mode...
Me.ApplicationBindingSourc
Me.EmployeeBindingSource.E
If Me.Validate() Then
UpdateDatabase()
End If
'-- Update routine
' Update Application ?
If Me.DMSI_HR_Dataset.Applica
Me.ApplicationTableAdapter
End If
' Update Employee ?
If Me.DMSI_HR_Dataset.Employe
iRowsChanged = Me.EmployeeTableAdapter.Up
End If
'-- By the way: iRowsChanged returns 1 which is correct...
'-- That's all - From the examples I've checked I think that is all I need... what Am I missing -- I can write Custom code, but trying to avoid it if I can figure out all this bound control stuff...
Thanks in Advance -
Stan
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I cannot see anything obviously wrong with the code. So see if this rings any bells
http://www.experts-exchang
Roger
Business Accounts
Answer for Membership
by: vadim63Posted on 2006-09-06 at 15:12:18ID: 17466803
What is UpdateDatabase()?