|
Two
TFIBDatabase
methods supporting new commands RDB$GET_CONTEXT and RDB$SET_CONTEXT
implemented in Firebird 2 have been added.
function GetContextVariable (ContextSpace: TFBContextSpace; const
VarName: string): Variant;
procedure SetContextVariable (ContextSpace: TFBContextSpace; const
VarName, VarValue: string);
Note: New features 4-6 enable developers to easily use their own settings in the field repository.
Example:
If you need to set the EditMask property, add the EDIT_MASK field to the repository table; create a container; make it global by setting the IsGlobal property to True; and write the following code in the OnApplyFieldRepository event handler:
procedure TForm1.DataSetsContainer1ApplyFieldRepository(DataSet: TDataSet; Field: TField; FieldInfo: TpFIBFieldInfo);
begin
Field.EditMask:=FieldInfo.OtherInfo.Values['EDIT_MASK'];
end;
Our 911 dispatch center needed a program to monitor the status of equipment used in emergency situations. If one dispatcher modified the status of a piece of equipment, all the other dispatchers needed to see this change immediately. The most elegant way to implement this was by using Firebird Events to asynchronously notify all the users whenever a pertinent change had occurred at the database server. After failing to implement this myself using the Firebird API, I bought a copy of FIBPlus. I dropped a Database, EventAlert and ErrorHandler control into a C++ Builder DataModule and within minutes I had all the functionality I needed. I was able to complete the project quickly and the users are thrilled with the results because I gave them more features than they originally asked for. >>