Forum General


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Why the error "database disk image is malformed"?

vagnercorreavagnercorrea BRMember

I have an app that needs to work with a lot of data, and to download it faster, I created an SQLite bank in my web application and downloaded this bank in the app via WebApi.
After downloading in the app, when executing queries I get the error message "database disk image is malformed".
When making the same query in the web application, the error does not occur.

I don't know what else to do.
Can someone help me?

Xamarin App

database disk image is malformed

using sqlite-net-pcl version 1.6.292
on project netstandard2.0

var connection = new SQLiteConnection(pathFileBase, storeDateTimeAsTicks: false);
int count = connection.ExecuteScalar("select count(*) from Patrimonio");

Web Aplication

No errors.

using System.Data.SQLite.Core 1.0.112
on TargetFrameworkVersion v4.5.2

var connection = new SQLiteConnection(pathFileBase);
int count = connection.ExecuteScalar("select count(*) from Patrimonio");

Sign In or Register to comment.