Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loosing data on save

Status
Not open for further replies.

Saturn57

Programmer
Aug 30, 2007
275
CA
I have a form with a datanavigator. I will select the button to create a new record and input data but when i save the data it disappears and it is not saved. However if I press the button to go to the next record and then save it saves the first record. What should I do to avoid haveing to select the next record before saving.
 
I've not personally used the datanavigator but these links (here and here) might be a help to you.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.

 
start by stepping through the code to see when your code is executing. If this was created using wizards with actually writing code, then don't use the wizards. write the code so you know what it's doing and you can test/set through the code.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
My code executes the following:

private void quoteCalcHeaderBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.quoteCalcHeaderBindingSource.EndEdit();
this.quoteCalcHeaderTableAdapter.Update(this.estimatorDataSet.QuoteCalcHeader);
this.Validate();
this.quoteCalcBodyBindingSource.EndEdit();
this.quoteCalcBodyTableAdapter.Update(this.estimatorDataSet.QuoteCalcBody);
}
 
ok, this looks straight foward. the next step is to step through each of these members to see what is happening. continue this until you find the problem.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top