Page 1 of 1

database disk image is malformed

Posted: Sat 27 Jun 2015 11:47
by ibdac1pro
Hi,

sPathFile := TPath.Combine(IncludeTrailingPathDelimiter(TPath.GetDocumentsPath), 'sqlite3.DB');
Flag := TFile.Exists(sPathFile);

if Flag then
begin
DBConn.SpecificOptions.Values['ForceCreateDatabase'] := 'False';
end
else
begin
DBConn.SpecificOptions.Values['ForceCreateDatabase'] := 'True';
DBConn.SpecificOptions.Values['Direct'] := 'True';
DBConn.SpecificOptions.Values['EncryptionAlgorithm'] := 'leBlowfish';
DBConn.SpecificOptions.Values['EncryptionKey'] := '11111';
end;

DBConn.Database := sPathFile;
DBConn.Open; // An error occurred.

Error Message: database disk image is malformed.

How to fix?

Delphi XE7 Firemonkey
UniDac 6.1.3
Sqlite 3

Re: database disk image is malformed

Posted: Sun 28 Jun 2015 03:19
by ibdac1pro
Solved.

sPathFile := TPath.Combine(IncludeTrailingPathDelimiter(TPath.GetDocumentsPath), 'sqlite3.DB');
Flag := TFile.Exists(sPathFile);

if Flag then
DBConn.SpecificOptions.Values['ForceCreateDatabase'] := 'False'
else
DBConn.SpecificOptions.Values['ForceCreateDatabase'] := 'True';

DBConn.SpecificOptions.Values['Direct'] := 'True';
DBConn.SpecificOptions.Values['EncryptionAlgorithm'] := 'leBlowfish';
DBConn.SpecificOptions.Values['EncryptionKey'] := '11111';


DBConn.Database := sPathFile;
DBConn.Open; // No error

Re: database disk image is malformed

Posted: Tue 30 Jun 2015 08:38
by AlexP
Hello,

Glad to see that you solved the problem. If you have any other questions, feel free to contact us.