If I build an application using BS 2008 in C# that uses an SQL database, Do I have to include SQL Express as part of the deployment package? In other words, does the user need SQL Express on his/her machine in order to use my application if my app does all the work?

Recommended Answers

All 7 Replies

Welcome,

You wouldn't normally deploy sql server with an application, you normally have sql server running on a dedicated windows server on the network and clients connect to it, otherwise you have no single database for the company - each user has their own database, which doesn't make sense. Take a look at link - http://en.csharp-online.net/Deploying_Windows_Applications%E2%80%94Prerequisites.

>Do I have to include SQL Express as part of the deployment package?

Text from MSDN - Embedding SQL Server Express into Custom Applications.

This white paper discusses how to integrate and deploy Microsoft SQL Server Express-based applications by using configuration files and the ClickOnce deployment technology in Microsoft Visual Studio.

Reference thread : http://www.daniweb.com/forums/thread240046.html

Well, the app is for churches, and most churches in my area have workgroups, if they have networks at all.

I think you should go with Microsoft SQL Server Workgroup or Standard. Take a look at Features Comparison.

Well you can also go through with SQL Express

I ship MSDE / SQL Express with a few of my applications but as adatapost mentioned you should have two installers -- a lighweight application for just your software and another with your software and MSSQL. Depending on how complicated you want to make your life you could have the SQL Server as a pre-requisit of the application or an option to install it as a separate feature in the application. By doing this you're getting beyond that capabilities of the deployment projects in visual studio (it is possible, but I would not advise going this route).

To save you some time here are the parameters you should start with for a silent install of SQL Server. Adjust as your project requires:
For MSSQL-2000:

setup.exe SAPWD="PASSWORD" INSTANCENAME="InstanceName" TARGETDIR="C:\MSDE\Binn" DATADIR="C:\MSDE\Data" SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 /L*v C:\SQL_Install.log

SQL-2005:

setup.exe /qb ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE INSTANCENAME=InstanceName SAVESYSDB=1 SQLBROWSERAUTOSTART=1 SQLAUTOSTART=1 AGTAUTOSTART=1 SECURITYMODE=SQL SAPWD=password DISABLENETWORKPROTOCOLS=0 ERRORREPORTING=1 SQMREPORTING=0 ADDUSERASADMIN=1 INSTALLSQLDIR="%ProgramFiles%\Microsoft SQL Server\"

I haven't gotten around to SQL2008 yet :\

I think Expres is going to work because a 4GB DB is a huge DB. Am I thinking wrong?

It depends what your application does. It is safe to assume that in most cases it would take a couple of years to hit 4GB worth of data. If it is a scheduling app for your church then it will probably last a decade. If you don't care about data after N years you could purge it to reclaim space.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.