Page 1 of 1

Sqlite 3.7.5 SQLITE_MISUSE Failure (Zeos 6.6.6 Delphi 6)

Posted: 29.03.2011, 11:36
by Stilgar
State

Code: Select all

  PRAGMA show_datatypes = ON
sql arrived from TZSQLiteConnection.Open

Code: Select all

 SQL := 'PRAGMA show_datatypes = ON';
    ErrorCode := FPlainDriver.Execute(FHandle, PChar(SQL),
      nil, nil, ErrorMessage);
Result=21. (SQLITE_MISUSE http://www.sqlite.org/c3ref/c_abort.html)

I've searched it in the forum, but don't find info about this case.
Can you provide me links or info?
Thanks

Posted: 29.03.2011, 16:39
by Stilgar
Solved???!!!
Change at runtime the Connessione.Protocol and Connessione.Database.

Posted: 03.04.2011, 00:21
by mdaems
Have a look here : http://zeos.firmos.at/viewtopic.php?t=3097
That might explain your problem.

Mark

Posted: 13.03.2012, 23:18
by Stilgar
My excuse for inaction by the forum.
Thanks for the replies.
I stoped the project for job and family issues.
A small overview on target:
I want do a small utility for my PathFinder RPG Master. A Character Sheets manager.
I use ZDBC as a Java programmer
Now the problem is fixed. With ExpandFileName.
Thanks


The code is :

Code: Select all

var
  driver: IZDriver;
  url: string;
const
  databaseName = '..\..\data\pathfinder.sqlite.s3db';
begin
  inherited Create(AOwner);
  url := 'zdbc:sqlite-3:///' + ExtractFilePath(Application.ExeName)+(databaseName);   
  DriverManager.AddLoggingListener(Self);
  driver := DriverManager.GetDriver(url);
  FConnessione := nil;
  if assigned(driver) then
  begin
    FConnessione := driver.Connect(url, nil);
    if not assigned(FConnessione) then
    begin
      raise Exception.Create('Database connection error!');
    end
    else
    begin
      FConnessione.SetAutoCommit(False);
    end;
  end
  else
    raise Exception.Create('Driver SQL not found!');
  FCollezioneRazza := TCollezioneRazza.Create;
  FCollezioneDivinita := TCollezioneDivinita.Create;
  FAllineamenti := TStringList.Create;
  LoadAllineamento;
  LoadDivinita;
  LoadRazze;
  LoadClassi;
  FConnessione.Close;
end;