Skip to content

Commit b4026fe

Browse files
authored
Update sqlite-databases.md
Fixes the SQLite Batteries Issue, otherwise the current example does not work.
1 parent 7ea7381 commit b4026fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

uwp/data-access/sqlite-databases.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The rest of this guide helps you to use this library.
4141

4242
## Set up your solution to use the Microsoft.Data.SQlite library
4343

44-
We'll start with a basic UWP project, and then install the appropriate Nuget packages.
44+
We'll start with a basic UWP project, and then install the appropriate Nuget packages, please pay attention, install `Microsoft.Data.Sqlite` NOT `Microsoft.Data.Sqlite.Core`.
4545

4646
All supported versions of Windows support SQLite, so your app does not have to package SQLite libraries. Instead, your app can use the version of SQLite that comes installed with Windows. This helps you in a few ways.
4747

@@ -150,6 +150,7 @@ public static void AddData(string inputText)
150150
using (SqliteConnection db =
151151
new SqliteConnection($"Filename={dbpath}"))
152152
{
153+
SQLitePCL.Batteries.Init();
153154
db.Open();
154155

155156
SqliteCommand insertCommand = new SqliteCommand();

0 commit comments

Comments
 (0)