VB 2005 express not saving data to sql express

  • Thread starter Thread starter all2neat
  • Start date Start date
A

all2neat

hello. I can enter in data in the vb program itself and it will save
data there but when i run my program and enter data it will not save
the changes to the database. Any ideas on how to get my program to use
to commit the data. I used the built in code generator to get a link to
the database, i do not get any errors when i click on the save button.
 
All,

Did you make any code to update, than please show it to us, in this way an
answer is almost impossible.

Cor
 
hello. I can enter in data in the vb program itself and it will save
data there but when i run my program and enter data it will not save
the changes to the database. Any ideas on how to get my program to use
to commit the data. I used the built in code generator to get a link to
the database, i do not get any errors when i click on the save button.

Assuming valid code in the save event and by "run" you mean in debug
mode, then try this:
1) Try running from the .exe file in either the debug or release
folder.
2) If "save" works there, then the app is working properly.
3) When run from the IDE or .exe file, the working db file is the copy
found in the debug and/or release folder. By default, each time the
program is run in the IDE, a new copy of the original db file is
placed in the debug folder, so, it appears that "save" does not work.
4) If you want "save" to work in debug mode, you need to place a copy
of the original db in the debug and release folder. Then, in the
Solution Explorer, select the db file attached to the app and change
the "Copy to output directory" property to "Do Not Copy".
5) If distributing the app, by aware of which db file you actually
want to distribute.

Gene
 
Back
Top