[RESOLVED] Error : SQL Error : library routine called out .

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
dav999
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 29.08.2008, 07:58

[RESOLVED] Error : SQL Error : library routine called out .

Post by dav999 »

Hello,

i have this error in loading, but this error comming before the oncreate of my first form.

i have verifed my path to the database it's correct.

i use the last stable realses (6.6.3) and i dev into lazarus/freepascal in ubuntu 8.04.
I have only this error in another computer that haven't installed FPC/lazarus (i have rename & install the libsqlite.so in /usr/lib)

I have try to install the last svn version, but i have 2 errors when i try to compile it

i have seen this post http://zeos.firmos.at/viewtopic.php?t=1 ... d+sequence, but i search the TZSQLiteStatement.Execute routine, i can't find im.

If anyone have an idea...

Thanks
ps : excuse for my poor english but if anyone speak french :)
Last edited by dav999 on 03.09.2008, 15:42, edited 1 time in total.
ssamayoa
Junior Boarder
Junior Boarder
Posts: 29
Joined: 14.01.2006, 19:06

Post by ssamayoa »

Hi.

To which database (MySQL, Oracle, etc.) are you connecting?

Regards.
dav999
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 29.08.2008, 07:58

Post by dav999 »

Oh excuse me : sqlite3 and i have correctly rename the libsqlite.so in /usr/lib/
dav999
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 29.08.2008, 07:58

Post by dav999 »

i give an complement information :

in unit ZIBEventAlerter i have this error when i try compiling zeoslib 6.6.3 :
.../Zeoslib/ZEOSDBO-6.6.3-stable/src/component/ZIBEventAlerter.pas(116,23) Error: Duplicate identifier "INFINITE"

Code: Select all

const
  IB_MAX_EVENT_BLOCK = 15;   // maximum events handled per block by InterBase
  IB_MAX_EVENT_LENGTH = 64;  // maximum event name length
  {$IFDEF LINUX}
  INFINITE = $FFFFFFFF;
  {$ENDIF}

//error it's the bottom line
{$IFDEF VER140BELOW}
  INFINITE = $FFFFFFFF;
  {$ENDIF}


threadvar
  FStatusVector: TARRAY_ISC_STATUS; 
for bypass this error i have comment the bold line i think it's not the problem ?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

See bug 131 in our bug tracker. This problem is fixed in SVN 6.6-patches branch.

Mark
Image
dav999
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 29.08.2008, 07:58

Post by dav999 »

i have check this code, recompiling and reinstall compo but it's resolve not my problem :(
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

But the compilation is OK now?

No idea about where to start solving your initial problem, however. Can you check the call stack to see when/where the error is actually raised? More specifically : what zeoslib routine or sqlite dll method is raising the error?

Mark
Image
dav999
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 29.08.2008, 07:58

Post by dav999 »

yes lazarus compiling without error now

for sql error the problem in the computer i compiled my app i haven't any error, this error appears only in another computer, i can't see but i trace my app with this code in form_create :

("log" is declared textfile in public variables)

Code: Select all

procedure Tfrm_depart.FormCreate%u28Sender%u3a TObject%u29;
begin

//Création du fichier log pour tracer les éventuelles erreurs
assignfile%u28log,ExtractFilePath%u28Application.ExeName%u29 + 'athletes.log'%u29;
rewrite%u28log%u29;

writeln%u28log,'********** ENTREE DANS LA PROCEDURE FORMCREATE ***********'%u29;  

and i have not a textfile when i start my app (in another pc if a start in my pc i have no error the app work great), i suppose this error come before the begining of my app ?

Thx
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Bad sqlite.dll version on the other pc?

Mark
Image
dav999
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 29.08.2008, 07:58

Post by dav999 »

i work only in linux (ubuntu 8.04) and i use the lastest library (3.6.2) and i rename to libsqlite.so in /usr/lib/

i have tested my app in another pc with unbuntu 7.10 and 8.04 and mandriva 2008

thx
dav999
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 29.08.2008, 07:58

Post by dav999 »

Ok the problem is resolved a great thanks to mark

in design time a have fill the database path, and this make the error (the database it's not found in another pc and the error come before the real starting to my app)

Bye
David
kabeza
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 31.03.2010, 13:35
Location: San Juan, Argentina
Contact:

SQL Error: library routine called out of sequence

Post by kabeza »

Hi guys
I made a search and found some threads regarding the error I've got while trying to work with SQLite:

SQL Error: library routine called out of sequence :oops:

- I downloaded latest ZeosDBO and installed on Delphi7
- Created new project
- Put components, queries, etc.
- Created SQLite DB, tables
- Put sqlite3.dll in project's folder
- I've used Path:=ExtractFilePath(Application.Exename) for loading DB

All went fine on my machine, but moved all the files (project.exe, db.sqlite, sqlite3.dll) to another machine and got

SQL Error: library routine called out of sequence :oops:

Can any1 help me to solve this? If I read ok, is this solved in SVN version? should I download svn and recompile everything?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

No recent changes, so updating SVN will probably not help.

But if your exe runs without trouble on your first PC and outside the IDE you should check on both machines what dll's and db files are loaded exactly.

According to this post the problem may also be db-filename related.

Mark
Image
kabeza
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 31.03.2010, 13:35
Location: San Juan, Argentina
Contact:

Post by kabeza »

I never thought "playa.sqlite" would be a bad name for my database...

I could not test in the other machine, but I'm beginning to suspect that the fact I have the zConnectionSQL.Connected property = true (at designtime) is making everything go bad when I try to change ZConnectionSQL.Database at mainForm.onCreate

so far, This is the code I have in the mainForm.onCreate

Code: Select all

  
  try
    begin
      ZConnectionSQL.Disconnect;
      Path := ExtractFilePath(Application.exename);
      ZConnectionSQL.Database := Path + '\playa.sqlite';
      ZConnectionSQL.Connect;
    end;
  except
    MessageDlg('Error!!', mtWarning, [mbOK], 0);
  end;
So I'll update after I run the soft in the other machine
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Oh, yes. When you connect at startup to a non-existing (development) DB before connecting to the right db this can cause trouble. When changing db at runtime don't connect in design time.

Mark
Image
Post Reply