Solved

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

Posted on 2007-11-22
11
1,180 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
 
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
[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now