iTag
iTag

Reputation: 409

Could not create DB Connection due to SQL-Cipher issue when migrating from Xamarin to .net Maui

I can create a DB Connection in Xamarin using the following code:

    var options = new SQLiteConnectionString(dbPath, true, dbPassword, postKeyAction: c =>
    {
        c.Execute("PRAGMA cipher_compatability = 3");
    });

 SQLiteConnection connection = new SQLiteConnection(options);

But the same code when I try to use it in .Net Maui with the .net7.0 version. It is not working and giving the following Error.

SQLite.SQLiteException: file is not a database Result:

SQLite.SQLite3+Result.NonDBFile

Nu-get Package which I have used:

Xamarin => sqlite-net-sqlcipher version:1.8.116

.NetMaui => sqlite-net-pcl version:1.8.116

Upvotes: 0

Views: 300

Answers (0)

Related Questions