Counter: 4755
Published: 2007-10-14 22:44:40

New features and enhancements:

1. A new TpFIBScripter component has been added.

It has the following properties:

property Script:TStrings ;  - stores a text of the script.

property Database: TpFIBDatabase; - stores the connection, where the script will be executed. You should not define this property if the script has the CREATE DATABASE command.

property Transaction: TpFIBTransaction ; - stores the transaction where the script will be executed. As the TpFIBScripter component can control transactions, you should not always define the Transaction: TpFIBTransaction property value.

property AutoDDL: boolean – defines whether to call Commit automatically after each DDL command when the script is being executed.

property Paused: Boolean – enables the developer to stop the script execution in TpFIBScripter event handlers.

property StopStatementNo – returns the number of the command where the user stopped the script execution.


TpFIBScripter methods:

Procedure Parse(Terminator: Char = ';') – parses the script, defined in the Script: TStrings property. The argument is the command separator (by default it is a semicolon “;”).
procedure ExecuteScript (FromStmt: integer = 1); -
executes the script defined in the Script: TStrings property. The argument is the number of the command which starts the execution.

procedure ExecuteFromFile (const FileName: string;Terminator: Char = ';'); - executes the script stored in the external file FileName. The full script text is not loaded in memory, the file is read line by line before the complete command is formed. When the command is ready, it’s executed and it’s text is deleted from memory. This approach enables you to execute very huge scripts.

function GetStatement (StmtNo: integer; Text: TStrings): PStatementDesc – enables you to get information about the command by its number позволяет (you should call the Parse method before it). The function returns a pointer to the PStatementDesc structure, which stores information about the command.

TpFIBScripter events:

property BeforeStatementExecute: TOnStatementExecute;

property AfterStatementExecute: TOnStatementExecute;

where

TOnStatementExecute = procedure(Sender: TObject; Line: Integer; StatementNo: Integer;  Desc: TStatementDesc; Statement: TStrings);

The events are called before/after the every command execution.

property OnExecuteError: TOnSQLScriptExecError;

where

TOnSQLScriptExecError = procedure(Sender: TObject; StatementNo: Integer; Line: Integer; Statement: TStrings; SQLCode: Integer; const Msg: string; var doRollBack: boolean; var Stop: Boolean) of object;


The event happens if the current command was executed with errors.

An example.

var scr: TpFIBScripter;
begin
  scr := TpFIBScripter.Create(nil);
  try
    Scr.Script.Text := MyScriptText;
    Scr.ExecuteScript;
  finally
    scr.Free;
  end;
end;

2. Now TpFIBDataSet has new methods:

    procedure DisableMasterSource;

  procedure EnableMasterSource;

  function  MasterSourceDisabled:boolean;


They are used to activate/deactivate the master-detail mode temporarily. For example:


   DetailDataSet.DisableMasterSource;
   try
     MasterDataSet.Edit;
     MasterDataSet.FieldByName('ID').asInteger:=NewValue;
     MasterDataSet.Post;
     ChangeDetailDataSetLinkField(NewValue);
   finally
    DetailDataSet.EnableMasterSource;
   end;

 
and the detail dataset won’t reopen.

3. TpFIBDataSet has a new AutoUpdateOptions.UseExecuteBlock: Boolean property. It works only if CachedUpdates = True. If UseExecuteBlock is equal to True, then calling of ApplyUpdates and ApplyUpdToBase will generate queries with EXECUTE BLOCK. In other words changes made in the CachedUpdates mode will be sent to the database not for each record separately but in packages of 255 records.

4. Now FIBPlus supports CsMonitor (implemented by Yury Plotnikov). To use it you should activate the directive "CSMonitor" in FIBPlus.inc (only for the full FIBPlus version).

5. TpFIBDatabase has a new method: procedure ClearQueryCacheList.

6. The TFIBDataTimeField and TFIBTimeField fields have the ShowMsec: Boolean property. If it is set to True, time values with milliseconds will be shown in visual DB components.

7. The Locate method works significantly faster. To use this feature you should deactivate the directive {$DEFINE FAST_LOCATE} in FIBPlus.inc (only for the full FIBPlus version).

8. If the data is sorted, the Lookup method uses sorting to search for necessary values in TpFIBDateset.

9. Now if you use Select from procedure in Firebird 2.1 and input parameters are boolean or GUID, fields with corresponding types are created in TpFIBdataSet.

Bugs fixed:

1.  Now UTF8 fields correctly work with InterBase 2007.

2.  The CancelUpdates logic of TpFIBDataSet has been changed. When you called the CancelUpdates method in the CachedUpdates mode, FIBPlus restored field values which remained just before canceling. For example, if you first edited the record and then deleted it, you got changed field values instead of the original ones after calling CancelUpdates.

3.  Unicode lookup-fields work correctly now.

4.  An error in the TpFIBDataSet.CloneRecord method appeared if there were deleted records. Fixed.

5.  The current record was positioned in the wrong place if the Refresh method was called automatically after record deleting (if the poRefreshDeleted option was active). Fixed.

6.  Now internal transaction parameters work correctly for Firebird 2.1.

7.  Now TSIBfibEventAlerter correctly registers events. This component operated improperly when TSIBfibEventAlerter and TpFIBDatabase were placed on different forms.

8.  Now the procedure TFIBLargeIntField.SetVarValue(const Value: Variant) method operates rightly. It worked incorrectly when it had an input NULL value.

Prices in Euro:

235 (1 copy)
1250 (unlimited)

Volume discounts are available...

We are a small software company with thousands of customers delivering comany wide systems including accounting, logistics, e-commerce, POS, sales etc etc. Several years ago, when we were still a very small company, we used Delphi 3 and Paradox combined with BDE. As our system (and customer base) grew I decided to switch to Delphi 5 and Interbase. Being a huge improvement over Delphi 3 and Paradox, I encountered numerous problems with IBX: memory leaks, performance issues and other problems. Borland was not to be bothered: IBX was provided "as is" and no support was avaliable. 
Not being very eager to use third party components with Delphi at first, I decided to give FIBPlus a try. At once all problems where gone: no more memory leaks and  performance was very consistent. 
But the real advantage of switching to FIBPlus came with the upgrade to D2005: after upgrading there were some problems with the new FIBPlus version. After emailing the problem I received an update within an hour! And this was at 11 pm! A few other (smaller) errors where handled in the same way. 
Our motto is: software is as good as its support. And support of Devrace is just great!
Just a little indication of our FIBPlus use: all our software runs 100% on FIBPlus. Our customers have a total of aprox. 4.800 Firebird databases in production, with a combined size of over 130TB and over 80 million transactions a day. Every
day. And FIBPlus has not failed a single transaction. Not once. There is, however, one (minor) drawback in using FIBPlus: while debugging an application which uses and invalid SQL instruction, de Delphi Debugger returns to the FIBPlus code instead of to our calling code (where the actual error comes from), thereby complicating de debug proces a little. But that is a very small price to pay for a otherwise brilliant third party solution! >>

Bas Jordans JorSoft Ltd
FOR CUSTOMERS
Download full versions and updates in our Customer's Center