sqlite3 error: file is encrypted or is not a database
Posted: Tue 05 Jan 2016 16:16
Hi,
I'm using UniDac 4.38 and user TUniConnection, TSQLiteUniProvider and TUniScript to create SQLite3 Database. Everything works fine, but when I try to use it in a SQLite client, I get the above error. I don't have any encryption on the db, but I heard that could be a version mismatch in SQLite. I presume that UniDac is creating SQLite3 db and not SQLIte2.
Any idea ?
Thanks
-------------------------------
I use the folowing code:
procedure Tdmod.CreateDB(AName: string);
begin
CloseDB;
// ---
Connection.SpecificOptions.Values['ForceCreateDatabase'] := 'True';
connection.Database := AName;
UniScript1.Execute;
end;
-------------- script: -----------------
DROP TABLE IF EXISTS "APP";
CREATE TABLE "APP" (
Name VARCHAR(30) PRIMARY KEY NOT NULL,
Prod CHAR(10),
Desc MEMO
);
DROP TABLE IF EXISTS "FIELD";
CREATE TABLE "FIELD" (
Name VARCHAR(30),
APP VARCHAR(30),
Desc MEMO
);
CREATE UNIQUE INDEX IDX_FieldApp ON Field (Name,App);
I'm using UniDac 4.38 and user TUniConnection, TSQLiteUniProvider and TUniScript to create SQLite3 Database. Everything works fine, but when I try to use it in a SQLite client, I get the above error. I don't have any encryption on the db, but I heard that could be a version mismatch in SQLite. I presume that UniDac is creating SQLite3 db and not SQLIte2.
Any idea ?
Thanks
-------------------------------
I use the folowing code:
procedure Tdmod.CreateDB(AName: string);
begin
CloseDB;
// ---
Connection.SpecificOptions.Values['ForceCreateDatabase'] := 'True';
connection.Database := AName;
UniScript1.Execute;
end;
-------------- script: -----------------
DROP TABLE IF EXISTS "APP";
CREATE TABLE "APP" (
Name VARCHAR(30) PRIMARY KEY NOT NULL,
Prod CHAR(10),
Desc MEMO
);
DROP TABLE IF EXISTS "FIELD";
CREATE TABLE "FIELD" (
Name VARCHAR(30),
APP VARCHAR(30),
Desc MEMO
);
CREATE UNIQUE INDEX IDX_FieldApp ON Field (Name,App);