Page 1 of 1

ftInteger, ftBCD and ftFMTBCD types

Posted: Thu 27 Jan 2011 10:52
by ralphera
Hello,
Want to buy the driver and I have a question:
Currently working with Firebird and need to maintain compatibility with it and I need the fields NUMBER <10 are "ftINTEGER" AND also that the fields NUMBER (18,4) are "ftFMTBCD.
Is it possible?

Posted: Fri 28 Jan 2011 12:00
by AlexP
Hello,

Yes, it is possible.
To get such behavior you should set the following options like:

Delphi 2006 and lower IDE versions

procedure TForm1.SQLConnection1AfterConnect(Sender: TObject);
const
coIntegerPrecision = TSQLConnectionOption(205);
coEnableBCD = TSQLConnectionOption(102);
begin
SQLConnection1.SQLConnection.SetOption(coEnableBCD, Integer(True));
SQLConnection1.SQLConnection.SetOption(coIntegerPrecision, Integer(10));
end;

Starting with CodeGear RAD Studio 2007

SQLConnection.Params.Values['EnableBCD'] := 'true';
SQLConnection.Params.Values['IntegerPrecision']:= '10'

For more information, please see the Readme.html help file.