Hi all
Trying to develop an application using SQlite tables to store forms structure and contents, I use raw access as I did in Delphi with the last Lazarus IDE 2.0.10 on windows 8 :
"var
i,k,ColCount,lon : integer;
query,tex : string; //UTF8String;
ok : boolean;
CodeResult : integer;
stmt : pointer;
pz : PChar;
qcm : Tqcm;
begin
lis.Clear;
Ferr_bd := false;
Ferreur := '';
query := 'SELECT * FROM "' + table_bd + '";' + #0;
stmt := nil; pz := nil;
lon := Length(query) + 1;
CodeResult := sqlite3_prepare_v2(F_DB,PChar(query),lon,stmt,pz);
ok := CodeResult = SQLITE_OK;
"
and get always CodeResult == 1 (generic error).
I tried with #0 (or without it) and also try UTF8String instead of string, and always get the same error.
The first SQlite operations :
sqlite3_open_v2(),
sqlite3_prepare_v2() with "query := 'PRAGMA foreign_keys = ON;';" or
sqlite3_libversion;
work well.
I don't how to find why it's wrong !
Thanks a lot for your help.
Bernard