database disk image is malformed
(1) By VAGNER CORREA DOS SANTOS (vagnercds1) on 2020-05-15 17:43:05 [source]
I have an app that needs to work with a lot of data, and to download it faster, I created a SQLite DataBase in SQLiteStudio, copied the file for a diferente andress, don't changed the file name and inserted data using my ASPNet MVC application. I maked downloaded this bank in the Xamarin forms 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 windows or web application, the error does not occur. I Executed the command to check de integrity, but don't havy any erros.
I don't know what else to do. Can someone help me?
Error database disk image is malformed
using sqlite-net-pcl version 1.6.292 on project netstandard2.0
Consulta var ConnectionInventario = new SQLiteConnection(pathFileBase, storeDateTimeAsTicks: false); int count = ConnectionInventario.ExecuteScalar<int>(@"select count(*) from Patrimonio");
Some times, "select count() from Patrimonio" work fine but, "select count() from Patrimonio where StatusRegistroId = 2" show the error
using System.Data.SQLite.Core 1.0.112 on TargetFrameworkVersion v4.5.2
var ConnectionInventario = new SQLiteConnection(UsuarioLogado.PathBaseFile);
int TotalPatrimonio = ConnectionInventario.ExecuteScalar<int>(@"select count(*) from Patrimonio");
(2) By Larry Brasfield (LarryBrasfield) on 2020-05-15 18:19:35 in reply to 1 [link] [source]
A preliminary fact to determine is whether or not the database file survived "downloading". An md5 hash of the file's ancestor, sitting where it can be used without error, should be compared to an md5 hash of the one reported to be malformed. Not everything called "downloading" results in bit-for-bit identical copies.
(3) By VAGNER CORREA DOS SANTOS (vagnercds1) on 2020-05-15 19:05:38 in reply to 2 [link] [source]
Thanks so much You are right, i compared the two files, before and after download and the hash are they really different