Help in saving database

  • Thread starter Thread starter SemiNoviceProgramer
  • Start date Start date
S

SemiNoviceProgramer

Dear friends
I started a new project in Visual studio 2005, then I added a database
connection using the wizard (access database)
the problem that when I press the save button on the automatically
generated toolbar nothing saved to my database file, so each time I
restarted the project I found the original dat unmodified
what code should I add to the wizard-generated code to let the original
database file updated permanently

thanks in advance
 
SemiNovice,

Can you tell what wizard you did use, by generating only a connection string
this will not work.

Cor
 
Dear friends
I started a new project in Visual studio 2005, then I added a database
connection using the wizard (access database)
the problem that when I press the save button on the automatically
generated toolbar nothing saved to my database file, so each time I
restarted the project I found the original dat unmodified
what code should I add to the wizard-generated code to let the original
database file updated permanently

thanks in advance

1) Run the project .exe file in the project's bin\debug folder.
2) Save some data and then close app.
3) Rerun the .exe file.
4) Do the saved changes show?

Gene
 
thank you Cor for your reply,
I mean the add new data source wizard in VS 2005 (the Tab next to the
solution explorer)
Every thing wworks weel excepth that the Save button saves to the data
set not to the data base!
thanks in advance for your help
Nesr
 
That can be a long traject to find why.

So you did do
Data create DataSource
Dragged the DataSource from the DataSourceView box on your form

Than there should be generated beside the dataview with the save button as a
diskette something as
BindingSource.EndEdit
TableAdapter Fill

Is that the situation?

Cor
 
Yes this is the situation, and unfortunately the save button (the
diskette) did not save changes to the database but to the dataset (ie
changes are temporarely occured till I stopped running the program, so
when stopped and restarted, the original data base is loaded and all
changes are discarded)


What Can I Do to save to the database file???


Thanks to you all
 
Novice,

Withouth that there is an error showed this cannot happen.

Can you set before the code in the code part xxxxxxxxxxxxx.endedit a
breakpoint.

Click inside that second empty column on the left. Or right click
breakpoints and choose that.

Cor
 
Back
Top