After some deep debug I found where and when it occurred.
Using:
The instruction that caused the problem was in fileDelphi 7
FireBird 2.5.3
Unidac 5.5.12
in procedureIBCCallUni.pas
at line 3379:TGDS.FreeGDS
At this point something was more clear! Yesterday I added a line in the TUniConnection.BeforeConnect event to use the embedded library ever.FreeLibrary(hIBCLib); // Returns False on Win95 in DLL
The application has a .ini file where i can select the database: from server or embedded.
I thought that I can ever use the embedded library connecting to the server but it's not true!
So here how I solved:
Input:
cfgFirebird : string = from the .ini file. format: "server/port:databasename"
DefaultDatabaseName : string = the name of the database. format: "path\filename.fdb"
Code: Select all
procedure FireBirdBeforeConnect(Sender: TObject);
Var
j : integer;
Serv, Data : string;
begin
j := Pos(':', cfgFirebird);
if (j = 0) then begin
Data := DefaultDatabaseName;
Serv := '';
end else begin
Data := copy(cfgFirebird, j + 1, Length(cfgFirebird));
Serv := copy(cfgFirebird, 1, j -1);
end;
UCFireBird.Database := Data;
UCFireBird.Server := Serv;
if Serv = '' then
UCFireBird.SpecificOptions.Add('ClientLibrary=fbembed.dll');
end;