Page 1 of 1

Using Compression with Firebird 3

Posted: Mon 23 May 2016 03:56
by j_smart
How can I (from the client side) using IBDAC, apply the parameter to use compression?

According to the docs, I need to set WireCompression=true via a Database Parameter Block but not sure how to apply that using these components. I could see no property. I thought it may be under the Options memo on the TIBCConnection property but unsure what value to use for "Name". Using WireCompression=true here reports "Unknown DPB constant (wirecompression)".

I am running components version 5.7.23.

Thanks

Re: Using Compression with Firebird 3

Posted: Wed 25 May 2016 10:08
by ViktorV
Currently, IBDAC doesn't support compression for Firebird 3. We will consider the possibility to add this functionality. If you want us to implement the feature, please post it at our user voice forum: https://devart.uservoice.com/forums/104 ... e-firebird. If the suggestion gets a lot of votes, we will consider the possibility to implement it.

Re: Using Compression with Firebird 3

Posted: Mon 25 Sep 2017 09:04
by ViktorV
The new IBDAC 6.1.3 including support for WireCompression connection parameter for Firebird 3 is already available for download now.

Re: Using Compression with Firebird 3

Posted: Tue 19 Dec 2017 08:42
by Jank
Hi,

I have 6.1.4 an the source of IBCClasses.pas looks like that

Code: Select all

    {$IFDEF LITE}
      if FWireCompression and (FParams.IndexOfName('WireCompression') < 0) then
        FParams.Add('WireCompression=True');
    {$ENDIF LITE}
What is this "LITE"-Compilerdefine. It is not active for me.

Regards, Jan

Re: Using Compression with Firebird 3

Posted: Tue 19 Dec 2017 10:32
by ViktorV
LITE is define used for dbExpress driver for InterBase and Firebird. In IBDAC, this code is not used.

Re: Using Compression with Firebird 3

Posted: Tue 19 Dec 2017 10:50
by Jank
Okay, thank you for the Information.

How do I activate the wired compression for Firebird 3 with IBDAC?

Re: Using Compression with Firebird 3

Posted: Tue 19 Dec 2017 11:03
by ViktorV
To enable WireCompression on the client side, you should add the string "WireCompression=true" to the IBCConnection.Params. For example:

Code: Select all

IBCConnection.Params.Add('WireCompression=true');

Re: Using Compression with Firebird 3

Posted: Tue 19 Dec 2017 12:11
by Jank
Thank You!

Re: Using Compression with Firebird 3

Posted: Tue 13 Nov 2018 08:19
by Jank
Hello again,

I', using now Firebird 3.0.4, IBDAC 6.1.4 for RAD Studio 10 and added this param:
WireCompression=true

With Firebird 3.0.4 I can check the context variable WIRE_COMPRESSION. In this constellation it is false:

Code: Select all

select RDB$GET_CONTEXT('SYSTEM', 'WIRE_COMPRESSED')  from rdb$database
What do I wrong?

Code: Select all

procedure TForm4.Button1Click(Sender: TObject);
var
  IBCConnection1: TIBCConnection;
  IBCQuery1: TIBCQuery;
begin
  IBCConnection1 := TIBCConnection.Create(nil);
  try
    IBCConnection1.Database := 'e:\db\mydb.fdb';
    IBCConnection1.Params.Add('WireCompression=true');
    IBCConnection1.ClientLibrary := '.\fbclient.dll';
    IBCConnection1.Server := 'localhost';
    IBCConnection1.Port := '3053';
    IBCConnection1.LoginPrompt := False;
    IBCConnection1.Username := 'XXXXXXXX';
    IBCConnection1.Password := 'XXXXXXXX';

    IBCQuery1 := TIBCQuery.Create(nil);
    try
      IBCQuery1.Connection := IBCConnection1;
      IBCQuery1.SQL.Text := 'select RDB$GET_CONTEXT(''SYSTEM'', ''WIRE_COMPRESSED'')  from rdb$database';

      IBCConnection1.Open;
      IBCQuery1.Open;

      caption := IBCQuery1.Fields[0].AsString;

      IBCQuery1.Close;
      IBCConnection1.Close;

    finally
      FreeAndNil(IBCQuery1);
    end;
  finally
    FreeAndNil(IBCConnection1);
  end;
end;
Regards, Jan

Re: Using Compression with Firebird 3

Posted: Tue 13 Nov 2018 11:01
by ViktorV
In order for compression to work correctly, you should use the zlib1.dll library, the bitness of which should correspond to the bitness of your application. Please place the required zlib1.dll library in the directory with your executable file and make sure that your application starts useing it when calling the TIBCConnection.Connect method.
Note, in order to determine whether your application uses zlib1.dll you can use a third-party utility, e.g. Process Explorer.

Re: Using Compression with Firebird 3

Posted: Tue 13 Nov 2018 13:14
by Jank
Thank you, it works!

Re: Using Compression with Firebird 3

Posted: Tue 13 Nov 2018 13:16
by ViktorV
It is good to see that the problem has been solved.
Feel free to contact us if you have any further questions about our products.