Solved

Need a standalone database for Winform app - What's the best method

Posted on 2007-11-22
11
1,218 Views
Last Modified: 2013-12-16
I'm developing a winform app that needs data stored in a standalone database where the user can modify data after they install it. What's the best way to do this?

I'd like to use a sqldatasource or sql data provider and use tables, etc. Can I use SQL Express or Compact Edition? I tried to use a SQL Compact edition in VS2005. I created a table, tied the table to a binding source and then tied to a control. However, when I run the app, I get a 'Cannot find SQLCEME30.dll'. Am I just missing a reference or something? What about the client PC that is installing it? I'd like the app to be fairly portable after an install.

Is this the right way to go?
Thanks!
0
Comment
Question by:KBSLPDev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 40

Expert Comment

by:evilrix
ID: 20335453
SQL 2005 Express should be perfect for this, otherwise consider MySQL.
0
 
LVL 40

Expert Comment

by:evilrix
ID: 20335454
BTW: Compact Edition is for handheld devices I think (Windows CE).
0
 
LVL 13

Expert Comment

by:josgood
ID: 20335460
I have several WinForm applications that use SQL Server 2005 Express.  I also use SQL Server Management Studio Express when I want do enter SQL commands by hand.

Both are free from Microsoft.

I have no special references in the projects.

I'm running Win XP SP2.  Are you running Win CE?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 40

Expert Comment

by:evilrix
ID: 20335462
0
 
LVL 13

Expert Comment

by:josgood
ID: 20335467
It looks as though the DLL you need is in the SQL Server 2005 Mobile Edition Device SDK download.

See this link
http://www.microsoft.com/sql/editions/sqlmobile/installsdk.mspx
0
 
LVL 13

Expert Comment

by:josgood
ID: 20335472
Sorry, evilrix, I didn't see your post first.
0
 
LVL 40

Expert Comment

by:evilrix
ID: 20335478
@josgood No probs -- it's all good info :)
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20335515
If you just need little database features and less licencing problems, you can consider SQLite. It is a C++ library (see sqlite.org for source code) but you can interface with c#. Have a look to:
http://www.codeproject.com/useritems/SQLite_GUI.asp
http://www.codeproject.com/cs/database/cs_sqlitewrapper.asp
0
 
LVL 7

Expert Comment

by:photowhiz
ID: 20335684
The fact that there are so many answers to this is proof that there is no one "best" method. To make a decision we need to know more information:

Do you need a separate database app or one embedded into your application?
Does it install and run as a user or administrator?
How much data in total will you be storing?
How much data will you be working with in any one operation?
Do you need to interoperate with any existing apps or databases?
Will you need to exchange data files with other applications?
Will you be supporting this app into the future?

P.S. SQL Server Compact edition works fine on Forms apps.
0
 

Author Comment

by:KBSLPDev
ID: 20336276
I'd like it embedded into my app. I'm only storing about 100-500 rows, querying one or two tables at a time. No interoperation between apps. Yes, I plan on supporting the app in the future. I'd like to keep the install of the app to just the installation of the app rather than installing other applications such as SQL express to get it going. since it's so small. I've considered doing it from XML or Access.

Thoughts?
0
 
LVL 7

Accepted Solution

by:
photowhiz earned 250 total points
ID: 20337020
I'd like it embedded into my app.

   Then you need something built in to .Net or an assembly; SQL Server Express will not work.

I'm only storing about 100-500 rows, querying one or two tables at a time.

    This is insignificant amounts of data, flat files or XML will work fine.

No interoperation between apps.

    Then you can make up your own schema, lots of choices here.

Yes, I plan on supporting the app in the future.

   Again, no need to support existing formats or assemblies. Make up your own.

I'd like to keep the install of the app to just the installation of the app rather than installing other applications such as SQL express to get it going.

   SQL Express won't work for what you're doing, and is unnecessary anyway.

Since it's so small. I've considered doing it from XML or Access.

    XML sounds like a good choice to me; .Net has plenty of XML support built in. Since you don't need to interoperate with any other apps you can serialize your data directly to and from XML files. Check out http://samples.gotdotnet.com/quickstart/howto/doc/xmlserialization/RWObjFromXML.aspx
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question