Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2007-11-22
11
Medium Priority
?
1,266 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

886 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