Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using MS SQL Express in my C# App

3 views
Skip to first unread message

Todd Carnes

unread,
May 8, 2008, 9:00:57 PM5/8/08
to
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

Morten Wennevik [C# MVP]

unread,
May 9, 2008, 1:02:00 AM5/9/08
to
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


--
Happy Coding!
Morten Wennevik [C# MVP]

Todd Carnes

unread,
May 9, 2008, 1:15:09 AM5/9/08
to
Morten Wennevik [C# MVP] wrote:
> 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

Marc Scheuner

unread,
May 9, 2008, 1:30:09 AM5/9/08
to
>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

Peter Bromberg [C# MVP]

unread,
May 9, 2008, 1:48:29 PM5/9/08
to
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
"Todd Carnes" <toddc...@gmail.com> wrote in message
news:g007oj$u6$1...@aioe.org...

Todd Carnes

unread,
May 9, 2008, 4:05:29 PM5/9/08
to
Peter Bromberg [C# MVP] wrote:
> 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

BlackWasp

unread,
May 10, 2008, 10:55:39 AM5/10/08
to
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.

--

BlackWasp
www.blackwasp.co.uk


"Todd Carnes" <toddc...@gmail.com> wrote in message

news:g02aql$2lr$1...@aioe.org...

Todd Carnes

unread,
May 10, 2008, 7:46:01 PM5/10/08
to
BlackWasp wrote:
> 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

Arne Vajhøj

unread,
May 10, 2008, 8:42:16 PM5/10/08
to

I think so.

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

Arne

0 new messages