A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/dotnet/standard/data/sqlite/in-memory-databases below:

In-memory databases - Microsoft.Data.Sqlite | Microsoft Learn

In-memory databases

In this article

SQLite in-memory databases are databases stored entirely in memory, not on disk. Use the special data source filename :memory: to create an in-memory database. When the connection is closed, the database is deleted. When using :memory:, each connection creates its own database.

Data Source=:memory:

In-memory databases can be shared between multiple connections by using Mode=Memory and Cache=Shared in the connection string. The Data Source keyword is used to give the in-memory database a name. Connection strings using the same name will access the same in-memory database. The database persists as long as at least one connection to it remains open. A sample demonstrating this is available on GitHub.

Data Source=InMemorySample;Mode=Memory;Cache=Shared

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.

Additional resources

In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4