Page 1 of 1

Requested database driver was not found

Posted: 13.07.2018, 16:57
by hafedh.trimeche
Firebird-4.0.0.1057-0_Win32
Zeolib revision 4717

Using revision 4701 worked well but switching to 4717 raised this exception
////////////////////////////////////////////////////////////////

Code: Select all

constructor TEmbedConnection.Create(AOwner: TComponent);
const
  DBCharacterSet = 'utf8';
begin
  inherited;
  LoginPrompt            := False;
  LibLocation            := 'fbclient.dll';
  Protocol               := 'firebirdd-3.0';
  UseMetadata            := False;
  User                   := 'SYSDBA';
  Password               := 'masterkey';
  ClientCodepage         := DBCharacterSet;
  TransactIsolationLevel := tiReadCommitted;
  AutoCommit             := True;
  with Properties do
  begin
    Clear;
    Add('PAGE_SIZE '+ToStr(DefaultPageSize));
    Add('isc_dpb_force_write=1');
    Add('DEFAULT CHARACTER SET '+UpperCase(DBCharacterSet));
    Add('character_set_client='+DBCharacterSet);
    Add('character_set_connection='+DBCharacterSet);
    Add('character_set_database='+DBCharacterSet);
    Add('character_set_results='+DBCharacterSet);
    Add('character_set_server='+DBCharacterSet);
    Add('character_set_system='+DBCharacterSet);
    Add('collation_connection=utf8_general_ci');
    Add('collation_database=utf8_general_ci');
    Add('collation_server=utf8_general_ci');
    Add('Codepage=utf8');
  end;
end;

Code: Select all

constructor TSqlDB.Create(const AFileName:string;const ForceCreation:Boolean);
var
  Connection : TEmbedConnection;
begin
  uDBInit;
  inherited Create(nil);
  FConnected          := True;
  FDatabaseName       := ExpandDBFileName(Trim(AFileName));
  Connection          := TEmbedConnection.Create(nil);
  Connection.Database := FDatabaseName;
  if ForceCreation then
  begin
    DirCreate(FDatabaseName,True);
    FileDelete(FDatabaseName);
    Connection.Properties.Add('CreateNewDatabase=CREATE DATABASE '+QuotedStr(FDatabaseName));
  end;
  try
    Connection.Connect;
    Connection.Disconnect;
  except
    on e:Exception do
    begin
      BringException(e);
    end;
  end;
  FreeAndNil(Connection);
end;
////////////////////////////////////////////////////////////////

===============================================================================
Computer Name : DESKTOP-T775C1G
Memory manager : FastMM
Application Name : PGFClient.exe
Compiler Version : Delphi Tokyo+ [VER320]
JCL Version : 2.8.0 Build 5677
Indy Version : 10.6.2.0
Report Unique ID : {49F62E53-B195-4194-AF38-04C3FD0F7DC9}
Start Time : 2018-07-13 16:35:08.869
Exception Time : 2018-07-13 16:35:20.119
Application up time : 11 seconds 250 milliseconds
===============================================================================
System : Windows 10 Professional, Version: 10.0, Build: 42EE, ""
Processor : AMD, AMD Athlon(tm) II P320 Dual-Core Processor, 2100 MHz MMX
Display : 1680x1050 pixels, 32 bpp
Total Physical Memory : 5.748 GB
Free Physical Memory : 908.922 MB
Working Set Memory : 120.191 MB
===============================================================================
Exception class : EZSQLException
Requested database driver was not found
Exception address : 00921D1C
-------------------------------------------------------------------------------
Module : ZDbcIntfs
Procedure : ZDbcIntfs.TZDriverManager.GetConnectionWithParams
Unit : ZDbcIntfs.pas
Line : 1345
-------------------------------------------------------------------------------
[00921D17] ZDbcIntfs.TZDriverManager.GetConnectionWithParams (Line 1345, "ZDbcIntfs.pas" + 3) + $14
[00AFE761] ZAbstractConnection.TZAbstractConnection.Connect (Line 874, "ZAbstractConnection.pas" + 34) + $2B
[00B20BC5] uDB.TSqlDB.Create (Line 1933, "uDB.pas" + 14) + $5
[0040B7E4] System.@UStrClr + $1C
[00B173E2] uDB.db_open (Line 407, "uDB.pas" + 1) + $15
[00B22328] uAppDB.CreateMainDatabase (Line 28, "uAppDB.pas" + 2) + $3
[00502277] System.SyncObjs.TMutex.Release + $7
[00BCF283] uMutex.TExMutex.Release (Line 115, "uMutex.pas" + 2) + $3
[00C1909F] uMainForm.TUForm.Loaded (Line 1356, "uMainForm.pas" + 21) + $8
[004C16E7] System.Classes.NotifyGlobalLoading + $2B
[004C186E] System.Classes.InitInheritedComponent + $7E
[0064AA36] Vcl.Forms.TCustomForm.Create + $CE
[0041DE51] FastMM4.CalculateHeaderCheckSum + $D
[00C18AB7] uMainForm.TUForm.Create (Line 1255, "uMainForm.pas" + 1) + $8
[00656076] Vcl.Forms.TApplication.CreateForm + $76
[01254941] PGFClient.PGFClient (Line 17, "" + 3) + $13

Re: Requested database driver was not found

Posted: 15.07.2018, 12:54
by marsupilami
Hello,

the versioned drivers have been removed from Zeos 7.3 as well as the firebirdd series of drivers. Please use firebird instead of firebirdd-3.0. You also might want to check into the new firebird parameter fb_protocol. For more information see https://sourceforge.net/p/zeoslib/wiki/Things to know about the Zeos 7.2 release/.
Best regards,

Jan

Re: Requested database driver was not found

Posted: 17.07.2018, 12:12
by hafedh.trimeche
Hello Jan,

Thank you for your response.

Code: Select all

Protocol  := 'firebird';
is OK.

But removing the engine13 from the path to library an exception raised: Unable to complete network request to host "xnet://Global\FIREBIRD"

Please how to set fb_protocol to avoid the engine usage as mentioned:

This enables you to force the library to use xnet for connecting to the server, bypassing a local engine12.


Best regards.

Re: Requested database driver was not found

Posted: 17.07.2018, 15:29
by marsupilami
Hello Hafedh,

you probably need to reconfigure your firebird.conf to explicitly disable engine13.

About fb_protocol: The following code will force xnet.

Code: Select all

ZConnection.Properties.Add('fb_protocol=xnet')
Best regards,

Jan