Are there any classes that can be queried / modified like a SQL DB but is entirely local and internal to the program?
I am aiming to write a program that needs to have a local data source with all data saved in a file, but I would like to be able to query this information store just as I would a DB; LINQ compatibility would be a huge plus.
The data would only be accessible when the program was running meaning, there would be no other process running to serve the data such as SQL server.
You can use $stmt->rowCount() to find out if any rows were updated. It will be 0 if no rows were found, otherwise it will be non-zero.
Connect using SQL Server Object ExplorerTo access the connect dialog from SQL Server Object Explorer, click the toolbar button Add SQL Server. The connect dialog comes up. Choose your local, network, or Azure SQL server, select a database, provide credentials, and choose Connect.
You could use SQLite with DBLinq.
You can use SQL Server Compact Edition. It is hosted in-process and uses a .sdf
file locally. It works with LINQ and the LINQ-to-SQL designer. To use it, you'll just need to add a reference to System.Data.SqlServerCe.dll. It's very lightweight, familiar, and has excellent support in Visual Studio.
On a side note, the Visual C++ IDE team is using this database for their C++ IntelliSense information in Visual Studio 2010, replacing the old .ncb files. Based on their stated goals going into the project (rewriting the C++ IDE for massively improved IntelliSense performance and stability), seeing it used here says a lot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With