Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a windows forms application written in VS.NET 2010 with sql server. This application is installed on my system. Now i want to update some features in this setup means add some functionality. and make some changes in db (mdf) file also. how can i do this .

just like version updated.

Hello
Thats what I am looking for.
When i Create setup of my application there is an option remove existing version in properties. This is replace existing version of my application but it also replace database file. How i handle this problem. I have also changes in database.(like add some tables, procedures etc).
Posted
Updated 11-Mar-15 2:02am
v4

1 solution

To update your executable/libraries, you must have the source code, that you can update and then recompile. It will give you new updated executable/libraries.

For your database, you have to create some script(s) that will update your existing database's schema.

Then you have to create a new deployment package that will :
- replace the old exutable/libraries with the new one(s)
- execute the SQL script(s) against the existing database to update its schema without loosing current data.
 
Share this answer
 
Comments
ErBhati 11-Mar-15 8:19am    
Hello Phil
Thanks for your reply. but i am using mdf file of database which is inside my application. then how i can update schema of database. if you have any solution please reply.
phil.o 11-Mar-15 8:25am    
That does not change the process. Having a mdf file or using a service is the same : you have to execute your SQL update scripts against the database. Where this database is stored and how it is accessed is not relevant. If your application can access the database, then you can access it also, and execute scripts against it.
ErBhati 11-Mar-15 8:51am    
thanks again. I'll try it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900