#1 2016-09-14 07:15:54

Eric
Member
Registered: 2012-11-26
Posts: 129
Website

SynDBFirebird

Two suggestions:
- under Windows shouldn't it be looking for fbclient.dll (newer dll) before gds32.dll (legacy)
- if you are not using the embedded dll, TSQLDBFirebirdConnectionProperties.Create raises an exception which is then gobbled up, but the exception is annoying when debugging as it cannot be masked individually, so the suggestion would be either use a dedicated exception class (which could then be masked in the IDE) or avoid throwing an exception in the first place

Offline

#2 2016-09-14 07:55:19

Eric
Member
Registered: 2012-11-26
Posts: 129
Website

Re: SynDBFirebird

Also there seems to be an issue with the Firebird driver, as it allocates a second connection during the course of executing a statement on an existing connection, minimal test case below

program Test;

{$APPTYPE CONSOLE}

uses
  SysUtils, SynDB, SynDBFirebird;

var
   props : TSQLDBFirebirdConnectionProperties;
   conn : TSQLDBConnection;
   stmt : TSQLDBStatement;
begin
   props := TSQLDBFirebirdConnectionProperties.Create('yourserver:yourdatabase.fdb', '', 'user', 'password');
   conn := props.NewConnection;
   stmt := conn.NewStatement;
   stmt.Prepare('select field from sometable', True);  // fails with -502 here
   stmt.ExecutePrepared;
   while stmt.Step do
      Writeln(stmt.ColumnString(0));
end.

When tracing the code, there is a second connection initiated from within inherited Connect... or is there something wrong with my snippet above (besides not releasing stuff)

Offline

Board footer

Powered by FluxBB