3

I am facing an issue to set the Password attribute in the Sqlite connection string in Xamarin Forms Android application. It is working fine in Xamarin Forms iOS. I have used the following `

connection.ConnectionString = new SqliteConnectionStringBuilder(connection.ConnectionString)
        { Password = password }
        .ToString();
connection.Open();

` enter image description here You specified a password in the connection string, but the native SQLite library you're using doesn't support encryption.

I am using Microsoft.Data.Sqlite 3.1.5 nuget package on my Xamarin Forms application.

Any help would be appreciated.

Achayan
  • 31
  • 1
  • 2

1 Answers1

5

I know that is later to respond to this question, but the answer can help others to get solution quickly.

Below the solution as Jason has comment above :

dotnet remove package Microsoft.Data.Sqlite
dotnet add package Microsoft.Data.Sqlite.Core
dotnet add package SQLitePCLRaw.bundle_e_sqlcipher

https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/encryption?tabs=netcore-cli

Jhakiz
  • 1,519
  • 9
  • 16