4

I want to create an application and for that I need to have a database. By searching Google I came to know that for my purpose SQL localdb will be good as it is light and fast. Kindly tell me the procedure for embedding this database in my program. I want to create a desktop application which can run on any Windows machine.

2

4 Answers 4

3

I maintain a C# wrapper to the SQL LocalDB API in GitHub which is also available in NuGet. It will allow you to manage instances of SQL LocalDB in your application.

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

2 Comments

Simply embedding an instance of the sql express localDb does not require the use of Martin's excellent wrapper assuming you have ways of creating the database and other management tasks in the first place. There is the Microsoft supplied command line tool 'SqlLocalDb.exe' for that and of course VS 2013 itself. However if you want to fully manage the API behind localDb from code, this wrapper is useful. Be aware that localDb is designed as a development tool for futzing around with sql. For production, better to utilise Express or higher. Martin's reply should be the answer...
@RobVonNesselrode Microsoft disagree - "Express edition includes the SQL Server database engine only. Best suited to accept remote connections or administer remotely." msdn.microsoft.com/en-us/sqlserver2014express.aspx
1

Sql CE may be a good fit. Scott Guthrie posted about implementing this - http://weblogs.asp.net/scottgu/archive/2011/01/11/vs-2010-sp1-and-sql-ce.aspx

Comments

1

you can use Siaqodb,it is a C# written db and it is designed for embedded envs - http://siaqodb.com

Comments

0

I've had success using SQL Express in that way.

The most widely deployed database like you describe is SQLite. I would check that out as well.

SQLite HERE

Using a C# wrapper HERE

Or a C# port of SQLite HERE

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.