Solved

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

Posted on 2007-11-22
11
1,170 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
Comment Utility
SQL 2005 Express should be perfect for this, otherwise consider MySQL.
0
 
LVL 40

Expert Comment

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

Expert Comment

by:josgood
Comment Utility
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
Comment Utility
0
 
LVL 13

Expert Comment

by:josgood
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 13

Expert Comment

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

Expert Comment

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

Expert Comment

by:Jaime Olivares
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

744 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

17 Experts available now in Live!

Get 1:1 Help Now