2

Basically all I want is to be able to create like a self contained database in my Windows Forms application, I do not want to connect to a server or anything like that with SQL Server, I just want like a small database in the application that can handle a few transactions.

Like for instance if I create a Windows Forms application then it would have its own small database in it and when deploying it.. it will save rows there and stuff. I remember hearing about a plug in, it started with a CT or something don't recall, but it would be a plugin for Visual Studio.

Any help would be much appreciated.

Regards

2
  • 1
    Check out sqlite.org Commented Mar 13, 2012 at 0:52
  • Sql server compact (embedded) edition would fit your requirements. Commented Mar 13, 2012 at 0:56

4 Answers 4

4

You can use SQL Server Compact or SQLite (ADO.NET provider is available here). Both are embedded database engines that run in-process. You don't need to install anything, just include the appropriate DLLs with your application.

Sign up to request clarification or add additional context in comments.

Comments

0

Visual Studio has no problem providing you with just such a database. Just right click your project, add new item, and select SQL Server Database. The database created will be part of your project and can be deployed as needed.

2 Comments

This still relies on SQL Server and won't work if SQL Server is not installed. This is definitely not what the OP wants.
Actually it relies on SQL Server Express being installed locally; not on a server. OPs requirements are to not need to 'connect to a server or anything like that with MSSQL'. This is right out of the box. Although if a requirement was to not need to include the client files in the deployment package then yes I would suggest SSC or maybe even a .settings file.
0

If you have a limited amount of data you can just right-click the project and Add a DataSet. Then you can define multiple tables in the .xsd and store multiple rows. in the .xml. Then you can write some simple code in the .xsd code-behind to auto load and save defaults and even pull back rows of data. I typically use this approach for storing a single record in each table. It will also work with multiple records in each table. There's a point where if you start to get a lot of data you'll probably wish you had used something like SQL Compact Edition or something similar that you bundle with your app.

Comments

0

you can use sqlLite,this is the website http://www.sqlite.org/ or you can use access too

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.