connected to wrong database?

mukulmukul

Member
Joined
Jun 21, 2009
Messages
10
Programming Experience
Beginner
hi... very nice article.. http://www.vbdotnetforums.com/winfo...-changes-changes-gone-when-i-restart-app.html

abt my programn
i have a database in root directory.
i conceted my dataset to it
and clicked yes on the option that appears
i selected the option "copy if newer"




i am through with that problem
but the problem that i now have is
my data is being updated in the bin folder
whereas my dataset is connected to the database in the root directory database
so ..
my datatables are being poppulated by the data in the database at root directory.. where as my changes are being made in the bin folder database.

my root database is not affected by any changes
so this is my problem..
i want my database in root directory to be updated by the changes that i make during the runtime
so as to enable me solve the problem
or if u have any other solutions.. then plz help me out

if i conect my dataset to the database in bin folder.. then it says .. no such datbase exists... plz sir.. help out.. asap




i dnt very often access these forums, so mail me the solutions at
[email removed]
and if u cant . thn atleast post them here
if u have ny questions abt my prob and u can discus it wit me
then i m onlie most of the times at [email removed]
thank u very much
please .. if its possible to help.. il really appreciate ur time
thank u
 
Last edited by a moderator:
No, you do NOT want the database in your project folder to be updated with the changes you make at run time. That is absolutely the wrong way to do things. This is how it works.

You add a database to your project and it's added to the project folder along with all the other source files. You build the schema in that database and you add any default data to that database. When you build the project in the Debug configuration a copy of the database is created in the bin\Debug folder along with your EXE. You test your app using that database, saving your garbage data into it. Now, when it comes time to release your app, you build a Release version and another copy of the source database is created in the bin\Release folder. Because you debugged using a copy, your original is still nice and clean so you don't have to waste time cleaning it up for release.

If you make changes to your source database while debugging then what happens when you want to get rid of all your changes and start again? What happens when you want to change the schema? What happens when you want to release? In all those situations you would have to waste your time cleaning up the database full of test data.
 
thanku sir

thanks a lot sir..
i got through the problem
actualy it was a fault in my programming logic.. that i thot is a database connecting problem.
thanku very much for ur help

:)

i did it.. my project at my training. got completed before time. and my mentor was very happy wit that.. thanks a lot sir.. :)
 

Latest posts

Back
Top