Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

Deployment with database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Just D - 06 Jan 2008 08:15 GMT
All,

What's the simplest way of a deployment of an application written in C# and
using ADO.NET and MS SQL Server?

I created a deployment project in the VS2005, aded it to the solution,
configured, added the main project. The deployment project creates 2 files -
setup.exe and MyApplication.msi, it automatically checks for the existence
of MDAC and MS SQL Server 2005 Express Edition, that's fine. But to install
the application correctly I need to create a database, setup all required
permissions, then copy one DB table, which is heavy enough and should be
copied to the target DB if it's not yet created. Should I write a separate
app that can be called after I install the main application to take care of
the database? Or there is an easier way of doing that?

Also if the client machine already has a previous version of the database
and I need to upgrade it to the latest version what should I do to keep the
client's data? To analyze the database using my own application and then
upgrade the DB using some script? Or there is an easier way of doing that?

Any good ideas and/or hints will be greatly appreciated!

Thanks,
Just D.
Sébastien Ros - 06 Jan 2008 09:45 GMT
You can add you own custom code in other "steps" (called custom actions)
inside the setup. In those steps, you will be able to execute the database
initialization, using for instance a db restore command.

NB: You can also use a file based database with SQL Server Express 2005,
which would be easier for you, just embed the db as a "content" file in your
application.

In order to create and execute custom action during the installation, look
at this tutorial:
http://msdn2.microsoft.com/en-us/library/49b92ztk(VS.80).aspx

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.