Solved

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

Posted on 2007-11-22
11
1,184 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
  • 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
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.

770 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