Using MS SQL Express in my C# App

T

Todd Carnes

I'm writing my first app that uses SQL Express to store a bunch of user
data (vice using a simple txt file, etc.), but I have a question that
you guys who've been doing this a while will probably laugh at.

Once I've completed my app, will I have to ship SQL Express with my app
in order for people to use my program?

Todd
 
M

Morten Wennevik [C# MVP]

Hi Todd,

Not necessarily. If the user already has an SQL server he should be able to
use the existing one instead of adding a new. If you put this as a
requirement to use your program you can leave it up to the user to take care
of it, but if it is likely that the user does not already have an SQL server
you should consider shipping SQL Express with your program. There are some
licensing issues with this which I believe is only down to registering that
you intend to ship sql express along with your program

[How to Obtain SQL Server 2005 Express Edition]
http://www.microsoft.com/sql/editions/express/howtobuy.mspx
 
T

Todd Carnes

Morten said:
Hi Todd,

Not necessarily. If the user already has an SQL server he should be able to
use the existing one instead of adding a new. If you put this as a
requirement to use your program you can leave it up to the user to take care
of it, but if it is likely that the user does not already have an SQL server
you should consider shipping SQL Express with your program. There are some
licensing issues with this which I believe is only down to registering that
you intend to ship sql express along with your program

[How to Obtain SQL Server 2005 Express Edition]
http://www.microsoft.com/sql/editions/express/howtobuy.mspx

Thank you for your help. :)

Todd
 
M

Marc Scheuner

Once I've completed my app, will I have to ship SQL Express with my app
in order for people to use my program?

Yes - SQL Express needs to be present and isntalled at your customer's
site (or a full SQL Server version).

The "embedded" SQL Server that consists merely of a bunch of DLLs is
called "SQL Server Compact" - there you can ship everything with your
app, but it's limited in some ways.

http://www.microsoft.com/sql/editions/compact/default.mspx

Cheers
Marc
 
P

Peter Bromberg [C# MVP]

As long as your application doesn't require the use of stored procedures,
you might want to consider shipping your app with SQL Server Compact 3.5
edition. It can be deployed by simply including the 7 required assemblies
and your database "SDF" file with your app; no special installation is
required. It also takes up *Way* less space.
--Peter
 
T

Todd Carnes

Peter said:
As long as your application doesn't require the use of stored
procedures, you might want to consider shipping your app with SQL Server
Compact 3.5 edition. It can be deployed by simply including the 7
required assemblies and your database "SDF" file with your app; no
special installation is required. It also takes up *Way* less space.
--Peter

I need to study the topic more before deciding which way to go, but the
"compact" version sounds more like what I'm looking for so far.

Thank you everyone for taking the time to share your suggestions, links,
etc. with me. :)

Todd
 
B

BlackWasp

The compact edition is pretty good but check out the limitations first,
particularly if you are considering porting a database across from SQL
Server (Express) to CE.
 
T

Todd Carnes

BlackWasp said:
The compact edition is pretty good but check out the limitations first,
particularly if you are considering porting a database across from SQL
Server (Express) to CE.

I realize this may not really be the proper group for this question, but
this thread has made me wonder about something else. So,...

If you use the compact version, can a table in one *.sdf file have
foreign keys that reference items in a table in a different *.sdf file?

Or do all the tables I use in my program have to reside in the same file?

Todd
 
A

Arne Vajhøj

Todd said:
I realize this may not really be the proper group for this question, but
this thread has made me wonder about something else. So,...

If you use the compact version, can a table in one *.sdf file have
foreign keys that reference items in a table in a different *.sdf file?

Or do all the tables I use in my program have to reside in the same file?

I think so.

1 SELECT -> 1 Command -> 1 Connection -> 1 .SDF file

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top