IBX Change Log version (2.6-4 Build 14188) Mon, 08 Jan 2024 15:20:50 +0000 1. TIBCustomDataSet.ApplyUpdates: ensure controls are not permanently disabled if ApplyUpdates called before a cursor exists. 2. TIBCustomDataSet.CreateBlobStream: add check for empty dataset before creating the blob. 3. TIBCustomDataset.Requery: The display buffer pool is now also reset avoiding issues with left over pointers to invalid internal buffers. 4. TIBCustomDataset.PrimaryKeys when used in InternalRefresh. when more than one primary key is used by the dataset then the list of primary keys is now properly separated by a ';'. 5. When refresh is called for a dataset without any primary keys (e.g. views and stored procedures), the internal record number is now used to restore the cursor following the refresh. However, it should be noted that cannot be 100% reliable. The internal record number simply reflects the record fetch order and this can change between successive queries if records are inserted or deleted by the current or another user (if the read_committed transaction isolation level is used). 6. Inserting a record at the start of a grid and then resizing the grid should no longer result in an apparent duplication of records in the grid. Note: this was due to TDataset.SetCurrentRecord ignoring the bookmark flag (bfInserted). IBX works around this by no longer using this bookmark flag value. 7. Inserting a record into an empty grid and then resizing the grid should no longer result in an apparent duplication of records in the grid. 8. IBBufferedCursor. FCurrentRecordStatus now set correctly when selecting a specific record number. 9. IBCustomDataset: Calls to AfterScroll during a Locate operation are now suppressed until the end of the locate operation. 10.IBCustomDataset: Calls to BeforeScroll during a Locate operation are now suppressed. BeforeScroll is called once before the locate operation. IBX Change Log version (2.6-3 Build 14080) Sat, 21 Oct 2023 14:14:22 +0100 1. Update to calls to EInterbaseError to add default code page. Consequential on change to fbintf. 2. Update some examples to replace test for null date with the NullDate constant instead of zero. This is because Laz 3.0 changes the value of NullDate. IBX Change Log version (2.6-2 Build 14016) Sat, 05 Aug 2023 11:54:55 +0100 1. Fixed repeated "type" keyword in IBBufferCursors. This may cause a compile error with later versions of fpc - later than 3.2.2. 2. IBUpdateSQL. update internal queries if parent dataset database changed. 3. IBUpdateSQL: Do not prepare an empty internal query. 4. IBBufferedCursors: avoid range error when max field no. is > fields.count 5. IBBufferedCursors: avoid End of File error if refresh query returns and empty row count IBX Change Log version (2.6-1 Build 13985) Mon, 17 Jul 2023 14:16:41 +0100 1. Maintenance update of 2.6.0. This version is still at beta. 2. Reverse out changes to DrawCellText signature in IBArrayGrid and IBDynamic Grid. See https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/53aaae9c5e2a5edac5b1d2f70739a8ef7b0a9623 3. ibxscript: When parsing a store procedure or function with a variable name enclosed in doublequotes, the double quotes are no longer removed. IBX Change Log version (2.6-0 Build 13976) Thu, 22 Jun 2023 13:49:22 +0100 NOTE: THIS VERSION RE-WRITES THE INTERNAL BUFFER MANAGER AND SHOULD BE CONSIDERED AS BETA SOFTWARE. EVEN THOUGH IT HAS PASSED ALL REGRESSION TESTS, IT CANNOT BE ASSUMED TO BE PRODUCTION READY UNTIL WIDER USE. PLEASE REPORT ANY ISSUES TO support@mwasoftware.co.uk 1. Complete rewrite of internal buffer management in order to improve performance and maintainability. Highlights: * Extending the size of the buffer pool no longer has to copy the entire record cache. Instead, a new extent is simply added to the buffer pool. * A memory to memory copy of each display buffer now is avoided when scolling the dataset. * A separate set of buffers is now used for calculated fields. This avoids having to keep copies of calculated field values in the buffer cache. * Compact bitmaps are used to record null status and need to refresh in each buffer. * Display buffer type changed from PChar to TRecordBuffer in line with change of buffer type in FCL-DB. 2. TIBUpdateSQL: changes to SQL text will close linked dataset if open. This is to ensure same behaviour as TIBDataset, TIBTable and TIBStoredProcedure. 3. TField Provider Flags: pfRefreshOnInsert and pfRefreshOnUpdate are now supported. If either or both of these flags are set at design time (using the fields editor) then this forces a row refresh on respectively insert or update, or both, when the corresponding field is not present in an SQL RETURNING clause. 4. TIBCustomDataset.FieldDefsFromQuery moved to a helper class (TFieldDefsMaker) in order to improve maintainability and readability and to add identification of primary key fields. 5. TIBQuery, TIBDataset and TIBTable. Traditionally, IBX has implemented the Refresh method as a refresh of the current row. However, this is different behaviour to that described in the FPC documentation for TDataset.Refresh which is described as "refetches the data in the dataset from the underlying database, and attempts to reposition the cursor on the same record as it was". IBX now complies with the FPC definition of Refresh. 6. A progammatic Row Refresh should no longer be required. Use Insert/Update... returning to refresh any fields that may change following an insert or update i.e. Identify fields on Insert only, Computed By, Blob and array fields on both. If there are any other fields (e.g. updated by triggers) set the appropriate ProviderFlag for the field at Design Time to force a row refresh if not in the returning clause. 7. It should now be possible to insert a row into an empty unidirectional dataset. 8. New TIBQuery, TIBDataSet and TIBTable property: BufferChunksInFirstBlock (default 50). This gives the number of buffers in the initial block for the buffer pool in bi-directional datasets. BufferChunks (default 1000) gives the number of buffers in subsequent buffer pool blocks. This avoids large and mostly unused memory allocations for small datasets. IBX Change Log version (2.5-1 Build 13927) Tue, 6 Dec 2022 23:13:00 +0000 1. IBCustomDataset: avoid problem with additions to TFieldType by using a subset instead. 2. TIBDynamicGrid: change DrawCellText declaration to comply with laz 2.3.0 3. TIBArrayGrid: change DrawCellText declaration to comply with laz 2.3.0 IBX Change Log version (2.5-0 Build 13868) Fri, 29 Jul 2022 09:52:01 +0100 1. TIBTransaction: new properties property TransactionID: integer read GetTransactionID; property IsReadOnly: boolean read GetIsReadOnly; {published} property TransactionName: string read FTransactionName write SetTransactionName; 2. IBCustomDataset: per row blob and array buffer cached clear before processing Insert or Update...Returning. This allows blobs and arrays to be returned by the statement. 3. TSQLXMLReader moved from IBXScript to package fbintf unit IBUtils. 4. TransactionName initialised to a newly generated GUID if empty. 5. New unit: IBJournal. This provides the TIBJournal component which is a wrapper for the fbintf package's journaling capability. TIBJournal is used to set the file path and filename for the journal file and to Enabled (start journaling) and disable (stop journaling). See fbintf/doc/README.ClientSideJournaling.pdf for more information, and comments in IBJournal.pas. 6. TIBDatabase.InternalTransaction is now a read only transaction. 7. Bug fix: blob id no longer set to null on update when blob has not been retrieved. 8. Row auto refreshed on update/insert if blob or array field updated and field not in a returning clause. 9. ColumnCount moved from record buffer header to a single per dataset count. Reduces buffer overhead and avoids problem when refresh query has a different column count to select query i.e. incorrectly changing number of columns. 10. IBExtract: support added for UDR Functions, Procedure and Trigger declarations. 11. TIBDatabaseInfo. New property FirebirdVersion. This returns the current Firebird version string. Note that the Version property returns an InterBase compatible version string. 12. IBExtract: ensure sql identifiers returned as a LIST are always quoted. IBX Change Log version (2.5-0 Build 12933) Mon, 29 Nov 2021 14:59:54 +0000 1. IBCustomDataset: Modify TISQL component now defaults to GoToFirstRecordOnExecute := true. This is for compatibility with Firebird 5 where Update...Returning can return a cursor. IBX Change Log version (2.4-3 Build 12886) Sat, 23 Oct 2021 14:58:30 +0100 1. Add try-..except check when initially loading library in IDE. This should ensure that IDE continues to load even when a failure occurs in IBX load library. 2. IBXScript: now recognises a CASE...END block within a stored procedure and hence will correctly detect end of the outer containing block when the block contains a SELECT ... CASE ... END construct. 3. IBExtract: some further tidying up to remove extraneous white space. 4. IBCustomDataSet: DefaultFieldClasses array declaration updated to avoid compile time errors when extra elements are added to DB.TFieldType. 5. IBUpdate: updated to reflect changes to ISQLParam. 6. IBXScript: now correctly parses a DECLARE statement which includes a quoted string. 7. IBExtract: for ODS >=13, increment generator value by one for ALTER SEQUENCE statement. 8. IBSQL: Support for scrollable cursors added (note: local databases only) IBX Change Log version (2.4-2 Build 12773) Mon, 23 Aug 2021 11:59:42 +0100 1. TIBDatabaseInfo: review and tidy-up of property types. Most widen to int64 with the exception of those defined to be one byte wide e.g. DBImplementationNo. 2. TIBSQL: Batch Update/Insert support added. 3. TIBStoredProc: when generating the SQL, the value of the StoredProcName property is no longer automatically converted to upper case when it is syntactically a SQL Identifier. This is to support the use of stored procedures defined e.g. as CREATE PROCEDURE "iCASE". There could be a backwards compatibility issue when the StoredProcName was entered manually at design time. That is not selected from the drop down list. If the StoredProcName is entered in mixed case and the procedure was declared e.g. as CREATE PROCEDURE iCASE, then the SQL generation will be incorrect. You should ensure that the value of the StoredProcName is all upper case, unless it was declared under dialect 3 and explicitly as mixed case (i.e. delimited by double quotes). Note that when a stored procedure name was declared delimited in double quotes, as in the first example above, the value of the StoredProcName property must not include the delimiters (double quotes). 4. IBXUpgradeConfFile: an exception is now raised if a patch file specified in upgrade.conf was not found. This replaces silently ignoring the problem. 5. TIBLocalDBSupport: new property "SectionHeaderTemplate". This defaults to 'Version.%.3d' and is used to generate the section header names (for a given version no.) in the upgrade.conf file. IBX Change Log version (2.4-1 Build 12550) Wed, 23 Jun 2021 13:59:14 +0100 1. -c command line option added to fbsql example program. Used to set connection character set. IBX Change Log version (2.4-0 Build 12543) Mon, 22 Feb 2021 11:00:08 +0000 1. Firebird 4 support added. 2. New FB4 data types TIME WITH TIME ZONE, TIMESTAMP WITH TIME ZONE, DECFLOAT and extended precision NUMERIC fields are supported. 3. TFmtBCDField is used to support access to DECFLOAT and extended precision NUMERIC fields. 4. TIBDateTimeField and TIBTimeField are introduced in support of TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE fields. These inherit from TDateTimeField. 5. IBExtract now supports FB4 enhancements: - new data types as above - Identity column extensions - Default user role - SQL Security clause for Database, Tables, Procedures, Functions and Triggers - Internal Functions 6. IBExtract: new event: OnExtractLines. 7. IBExtract: revert create trigger to legacy syntax see Firebird CORE-6243, CORE-5545 and DOC-145 8. IBXServices: Server version no. parsing now allows any letter before major version number and is no longer restricted to 'V' e.g. "LI-T4.0.0.1436 Firebird 4.0 Beta 1" 9. TIBDataSet and TIBQuery: new property TZTextOption. Used to determine the default format for rendering a time zone. 10. TIBDataSet and TIBQuery: new property DefaultTZDate. Used to provide the default date to convert TIME WITH TIME ZONE data type values to and from GMT. 11. Unit name IBTypes changed to IBInternals. Internal interfaces TIBGUIInterface and TIBTimerInf renamed to IIBGUIInterface and IIBTimerInf respectively. 12. Constants: DPBPrefix and TPBPrefix moved to IB unit. DPBConstantNames and TPBConstantNames now accessible as properties of TIBDatabase and TIBTransaction respectively. 13. String Fields: when a fixed character with (CHAR) field is returned, it is now truncated to its fixed character width rather than being right padded with white space to the maximum data size. 14. TIBTable.Empty table. In additional to deleting all records in the underlying table, the internal buffers are now also flushed ensuring that the TIBTable is also empty. 15. TBatchSQLStatementReader: Line buffer is now cleared on call to reset. 16. TIBXControlService descendents: DatabaseName may now be set using a database connect string. The database name is extracted from the connect string. 17. DBControlGrid: Minor bug fixes. avoid AV on form closure, avoid black panel 18. TIBExtract: Data type of COMPUTED By columns is no longer included in SQL. 19. Local database on Linux and with legacy API and FB 2.5 embedded server: fixed problem with password not being present as required. 20. IBTreeView split into DBTreeView and IBTreeView. This former is an IBX indepedent version that can be customised to work with other database drivers. 21. ISQLMonitor: use platform specific LineEnding to delimit messages. Avoids unnecessary CR at end of line on Unix platforms. 22. ISQLMonitor: Unix: Default semaphore timeout increased from 1 second to 10 seconds in order to reduce risk of message loss. 23. ISQLMonitor: read and write count statistics now available via: property TIBSQLMonitor.ReadCount; IIBSQLMonitorHook.GetWriteCount: integer; 24. ISQLMonitor tidy up and unit split. IPC functions moved to new unit IBIPC. IBX Change Log version (2.3-5 Build 12350) Tue, 25 Aug 2020 16:11:02 +0100 1. TIBStringField: when a string value is read from a dataset buffer, if the number of UTF8 characters exceeds the string size then string is truncated to the maximum string size. This is usually a problem with fixed width columns right padded with white space. 2. SQLFiltered and SQLFilterParams added to TIBQuery, TIBTable and TIBDataset. If SQLFiltered is set then when a dataset is opened, each line in the SQLFilterParams property is assumed to be a SQL condition clause and ANDed into the Where clause of the SQL Select statement provided as a dataset property. Each such SQL condition thus acts as an additional filter on the dataset. 3. The Filtered property inherited from TDataset is no longer used for SQL (server side filters). 4. IBLookupComboEditBox: Selection should no longer reset to start of text when text matches complete entry. 5. TIBDataLink: Detail Dataset params not refreshed unless both master and detail dataset are active (avoids risk of access violation if master is inactive) 6. TIBEvents: Registered property can now be set at design time even if database not open 7. TIBEvents: component now correctly re-initialised after call to UnregisterEvents. This should prevent "spillover" of events between sessions. 8. TIBCustomDataset: GetNextRecord now called when reseting to first record of a unidirectional dataset. This should ensure that the internal buffer is set up correctly and avoids a duplicate initial row. 9. TIBStringField: DataSize now given as byte size of string less trailing any zero character. That is, the DataSize should be the field size * character set width. The value returned by DataSize is now the same as the Dataset buffer size reserved for the field. 10. IBExtract: Tidyup of SQL generation. Avoid unnecessary double quotes. 11. TIBCustomDataset: Add checks on buffer sizes when copying data from row to field buffer and vice-versa. This may result in an exception being raised (correctly) for older programs when using dataset fields added to a form and the database has been upgraded. For example, computed fields can change from 32-bit to 64-bit integers. In such cases, the field needs to be deleted in the IDE fields editor and then added back in. 12. IBCustomDataSet: CanInsert, CanEdit, CanDelete and CanRefresh updated to return false if query contains only white space and not just empty. 12. IBCustomDataset: Blob data is now cleared when TDataSet.Cancel is called. This should ensure that (e.g.) a TDBMemo is correctly refreshed after a dataset edit is cancelled. 13. IBCustomDataset: SetArrayIntf should no longer cause an access violation if called on a null field. 14. IBCustomDataSet: An access violation should no longer occur when calling CancelUpdates results in an empty dataTC86 Client side Filtered Dataset 1 X set. 15. IBCustomDataSet: OnUpdateError should now be called in all circumstances when a cached update is applied and an exception is raised. 16. IBCustomDataSet: Avoid access violation when SetBookmarkData called with nil pointer. 17. Console Mode Local Database support: backup/restore should now work correctly. 18. Local Database Support: if an upgrade fails, a downgrade is now performed if possible and an exception raised. 19. MinimumVersionNo added to Local Database Support. Database will not open if below this version no. and upgrade not possible. IBX Change Log version (2.3-4 Build 12041) Fri, 17 Apr 2020 14:00:32 +0100 1. TIBXDataSet and Generators: Generator Names that are not all upper case or not SQL Identifiers are now supported. 2. TIBXScript: Set Generator is no longer rejected as unrecognised SQL and is passed to the Firebird engine for execution. 3. TIBDataSet: Unidirectional datasets now give an error message if an attempt is made to scroll back. 4. New unit: IBMessages.pas. Contains only messages used by IBX and not FBIntf 5. TIBLookupComboEditBox: When generating auto-complete SQL, the ListField is now only enclosed in double quotes in SQL dialect 3 and when it needs to be. 6. TIBLookupComboEditBox: when the list source opens, the ListField name is now validated. If no match is found in the list of field names and the database has been opened in SQL Dialect 3, then the ListField Name is converted to upper case if it then matches a field name. Otherwise, a Listfield not valid exception occurs. 7. IBGeneratoreditor.pas: Add missing parenthesis around "IS" statement for compliance with fpc 3.2. IBX Change Log version (2.3-3 Build 11512) Fri, 28 Dec 2018 10:04:17 +0000 1. New property for TIBDatabase and TIBXServicesConnection. This is "ConfigOverrides" and is used to override the default settings in the client side "firebird.conf" This includes "WireCompression" and "WireCrypt". The value of this property is a "TStrings". Each line of the string list should be a setting in the same format as "firebird.conf". For example "WireCompression = true" in order to request wire compression on the client side. Note: explicit settings in the client side "firebird.conf" appear to take precedence over settings given in TIBDatabase and TIBXServicesConnection. Many client side settings also require a compatible setting in the server side "firebird.conf". For example "WireCompression = true" must also be set in the server's "firebird.conf" for wire compression to be used. Whether or not WireCompression or WireCrypt are in use can be checked using the information returned with the Client/Server protocol version. See ibx/examples/dbadmin and ibx/examples/dbinfo for examples of how to display this information. 2. New property for TIBDatabase and TIBXServicesConnection: "WireCompression". This is a "convenience" property. If set the "WireCompression=true" is added to the ConfigOverrides. If unchecked then this setting is removed. 3. TIBExtract: 64-bit integer types are now correctly extracted as "BIGINT" and not "INT64". 4. New published properties for TIBCSVDataOut, TIBInsertStmtsOut and TIBBlockFormatOut These are: property TimestampFormat: string; property DateFormat: string; property TimeFormat: string; Respectively, these provide the date time format templates for SQL types: TIMESTAMP, DATETIME and TIME. The format strings use the standard FPC date/time format characters (see https://www.freepascal.org/docs-html/rtl/sysutils/formatchars.html). If any of the above properties are set to an empty string, then the locale default is used. This uses the ShortDateFormat and the LongTimeFormat. In timestamp, the locale default is extended by appending '.zzz' to include milliseconds. TIBCSVDataOut by default sets these properties to the empty string, while the other two use: 'yyyy.mm.dd hh:nn:ss.zzz', 'yyyy.mm.dd' and 'hh:nn:ss.zzz' respectively. 5. New published property for TIBCSVDataOut: property QuoteStrings: boolean (default true) If false then strings are unquoted, otherwise, the QuoteChar property value is used to delimit each and every string in the output. 6. New published properties for TIBCSVDataOut: property FieldSeparator: string; property HeaderSeparator: string; Respectively, these provide the separator character(s) used to separate fields in data and header rows. Both default to ','. 7. New published properties for TIBCSVDataOut and TIBBlockFormatOut: TOnFormatTextString = procedure(sender: TObject; var TextString: string) of object; property OnFormatTextString; This event handler can be used to process text strings before they are included in the output e.g. to replace unprintable characters with alternative strings. This only applies to columns with an SQL Type of SQL_VARYING and SQL_TEXT. 8. TIBDataSet now raises an exception when ParamByName called with an invalid parameter name. Uses "FindParam" if in order to find out if a parameter with a given name exists and without raising and exception if it does not. 9. TIBQuery now uses IBX SQL Parser instead of the TParams SQL parser in order to ensure consistency with SQL queries. 10. CaseSensitiveParameterNames property added to TIBSQL, TIBDataSet and TIBQuery. When true, SQL statement parameter names are parsed case sensitive. Note for TIBDataSet only applies to Select query. 11. IBEvents: removing a TIBEvent component from a form should no longer result in an IDE exception. 12. LocalDBSupport: initial database creation should now work correctly when the schema source is an sql file. 13. TIBCMLocalDBSupport: new event handler "property OnProgressEvent: TOnProgressEvent" when defined, this handler will be called by the internal TIBXScript during initial database creation when the schema source is an sql file and may be used to provide a visual indication of progress in console mode. 14. TCustomIBLocalDBSupport: new public property "InOnCreateDB: boolean". This is set to true while a new local database is being created and its schema populated. Useful in (e.g.) TIBDatabase.OnAfterConnect handler to suppress actions when the database is disconnected/connected during the create DB procedure. 15. TIBXScript: any User/password parameters found in a CREATE DATABASE statement are now always ignored and replaced by the user name and password provided as the login parameters for the TIBDatabase referenced from the TIBXScript. The IgnoreCreateDatabase property still applies and the CREATE DATABASE statement is completely ignored if this property is true. 16. Code tidyup in IBTreeView: Node properties initialisation moved from TIBTreeView.AddNodes to TIBTreeView.Added. An OnAddition event handler is no longer needed to initialise ImageIndex and SelectImageIndex values on AddNode. 17. TIBDatabase.Attachment and TIBXServicesConnection.ServicesIntf properties are now read/write. This should enabled (e.g.) multiple instances of TIBDatabase to share the same database connection. 18. TIBDataSet and TIBQuery now support the TDataSet "Filter" property. if provided, this should be an conditional SQL expression suitable for including in an SQL Select statement "where" clause. If non-empty and the "Filtered" property is true then the SQL expression provided as the value of the "Filter" property is "ANDed" with any existing condition statement in the SQL statement's "Where" clause. If the "Filter" property is set at run time, the "Filtered" property is true and the dataset is already open, then the dataset is closed and re-opened automatically. The "Filter" condition may include IBX style parameters. In which case, their value must be set by the dataset's "OnBeforeOpen" event handler. This is a public property for TIBDataSet and TIBQuery query and intended for use at run time. Note: The property is a published property of TIBTable. The TIBTable functionality is unaffected by this change. IBX Change Log version (2.3-2) Wed, 05 Dec 2018 12:19:23 +0000 1. Remove need to check for IsMultiThread by providing access to GUI timers via IBGUIInterface. Note: master/detail delay timer does not apply to console mode apps. 2. TIBCustomDataSet: SQLParser ignored if it does not contain a valid select statement. This avoids problems if "Execute Block" is used as the Query. 3. IBSQLParser now uses the common SQL tokeniser from fbintf. This replaces the internal SQL tokeniser routines. 4. IBSQLParser: new property NotaSelectStmt. Set to true if SQL fails to parse as a select statement, with or without CTEs. 5. IBSQLParser: parser now recognises the "ROWS" clause. 6. TIBXScript now uses the common SQL tokeniser from fbintf. This replaces the internal SQL tokeniser routines. 7. Fix error in TIBXScript processing of "set" statements. This avoids exceptions being raised for valid set statements processed by a data formatter. 8. New published property for TIBDatabase and TIBXServicesConnection. This is FirebirdLibraryPathName: string. If not empty it is used to explicitly specify the path of the Firebird Library used by the database/services connection. 9. New read only public property for TIBDatabase and TIBXServicesConnection. This is FirebirdAPI and returns the IFirebirdAPI interface used by the database/ services connection. 10.SQL Property editors now quote parameter names if "Quote identifier" is selected or param name is not a valid SQL identifier. 11. IBLookupComboEditBox: In Lazarus 2.0, TDBLookupComboBox takes a more restrictive view of whether the text box should be editable when no DataSource is specified. TIBLookupComboEditBox has been updated to workaround this problem. As long as ReadOnly is false, the text box is editable when no DataSource is specified. 12. AllowUseOfFBLIB is now set to "true" at design time. This is to allow use of the FBLIB environment variable. If you do not want to permit this then you must modify the Register procedure in the design/IBDBReg.pas unit to remove this setting. IBX Change Log version (2.3-1) Thu, 25 Oct 2018 14:39:45 +0100 1. IBCustomDataset: replace deprecated function ValidUTF8String with call to Utf8EscapeControlChars IBX Change Log version (2.3-0) Mon, 16 Apr 2018 09:48:06 +0100 IMPORTANT: the source code tree has been re-organised for IBX 2.3. Please remove all previous copies of the IBX source code tree before installing this release. The IBX packages used by most users have not changed, with one exception. The IBServices unit has been moved to the package iblegacyServices.lpk. To continue to use the IBServices unit in your applications, please add the iblegacyServices to the list of dependencies. To do this, open the Project Inspector and select Add->New Requirement and select "ibLegacyServices" from the list of available packages. 1. New unit IBXServices. The IBXServices unit is a re-architectured update of the IBServices unit providing what is intended to be a clearer and easier to use set of IB Services components. See Chapter 10 of the IBX User Guide for more information and the guide to "Firebird Service Management Using IBX". As indicated above, the legacy services components are still available and provided in a separate package. There is no need to update working applications using the older versions except for an additional package dependency. 2. The IBX packages and source code tree have been re-organised in an attempt to finally get rid of the "duplicate ppu" warnings. This re-organisation should not affect existing users. Section 2.3 of the IBX User Guide describes the new set of IBX packages. 3. The ibx/examples/DBAdmin and the ibx/examples/services example have been updated to use the new Services API components. 4. The iblocal package has been updated to use the new Services API components. 5. procedure SetAutoAdmin; in the new IBX Services this method is now a member of TIBXSecurityService. It had been wrongly classified in the previous version as a per database configuration item. It is global to a server and hence correctly positioned as part of the Security Package. In the DBAdmin example, the setting has moved to the mappings page. 6. TIBXScript: IgnoreCreateDatabase added. If true then CREATE DATABASE statements are ignored. 7. TIBDatabase: DropDatabase now ensures that all transactions have been properly closed before the database is dropped. Before and After Disconnect event handlers are also fired. 8. TIBTransaction: OnStartTransaction event now fires every time the transaction is started and not just the first time. 9. IBDataOutput: Use FormatFloat for all performance statistics to avoid platform depenendency with comp type. 10. IBDataOutput: select query data output is now sent to stdout instead of stderr. 11. TIBDatabase: Remove regression. If a user login dialog changes the DatabaseName then this is recognised and not ignored. 12. TIBDataSet, TIBQuery, TIBTable: additions: function GetRowsAffected(var SelectCount, InsertCount, UpdateCount, DeleteCount: integer): boolean; function GetPerfStatistics(var stats: TPerfCounters): boolean; property EnableStatistics: boolean read FEnableStatistics write SetEnableStatistics; GetRowsAffected returns the affected row counts from the last insert/update/delete if EnableStatistics = true then GetPerfStatistics returns the current stats counters for the select query. Note: stats accumulate after each fetch from the database. To get total query cost after open, call the "Last" method and then GetPerfStatistics. See ibx/examples/consolemode for an example of the use of GetPerfStatistics 13. TIBExtract: Identity columns DDL. "Start with clause" now correctly encapsulated in parenthesises. 14. TIBExtract: new published property "AlwaysQuoteIdentifiers". If true then in dialect 3 SQL identifiers are always delimited by double quotes. If false, then they are only delimited if the identifier is a reserved word, contains lower case or special characters. Set this property to true to retain previous behaviour. 15. Insert SQL Property Editor. In Insert Returning Clause, Identity column names are now inserted in double quotes if not Reserved Words or valid SQL Identifiers. 16. TIBDataSet, TIBQuery, TIBTable: addition: property MasterDetailDelay: integer {defaults to zero} When non-zero and the dataset is a detail table referencing a master table through either a MasterSource (TIBTable) or a DataSource (TIBDataSet, TIBQuery) then a synchronisation delay is added (in milliseconds) between the master row changing and the detail dataset being re-opened. If the master dataset is scrolled before the delay expires then the delay is reset. This can be used to avoid performance overheads when scrolling through a large master dataset. Note: uses fptimer and hence requires a thread manager. Under Linux the chreads unit must be included in your project. TTimer is not used in order to avoid an LCL dependency. Requires FPC 3.0.2 or later. 17. TIBExtract: User role grants now excluded when etGrantsToUser not specified with Extract Option eoDatabase. 18. TIBLookupComboEditBox: Workaround added for https://bugs.freepascal.org/view.php?id=33428 When a deLayoutChanged event is reported on the ListSource dataset, the combobox text is updated. This allows a listsource (detail) to be in a Master/Detail relationship with the control's datasource (master). 19. TIBExtract: Full BigInt value range now supported for Generators/Sequences. 20. TIBExtract: Select Procedures (Procedure type 1) now include "SUSPEND;" clause in their stubs. Pedantic fix really, as procedures output in dependency order anyway. 21. TIBExtract: Package Headers and Package Bodies are now included in the extracted DDL (Firebird 3 and later only). 22. TIBLookupComboBox Autocomplete Fixes: i. Only appended text is now selected after autocomplete. ii. Uppercase keys no longer ignored for autocomplete. iii. Retain Prefix case is now honoured correctly. iv. When a DataSource is assigned, typing after autocomplete now extends prefix before autocomplete performed. i.e. behaviour now the same as when no DataSource assigned. 23. TIBXScript: Single Line Comments starting with '--' are now ignored when occurring between SQL statements. 24. TIBExtract: New published property CaseSensitiveObjectNames. If false (default) then ObjectNames are converted to upper case before matching against metadata object names, unless the objectname is delimited by double quotes, in which case, the double quotes are removed and the remaining string is used (unmodified) to match against the metadata object name. If true then the ObjectName is used as is without modification and matched against the metadata object name. No attempt is made to remove double quotes. 25. TIBExtract: New Extract Types: etDatabaseTriggers and etDDLTriggers. When used with eoTrigger, these extract types can be used to select only Database Triggers, or DDL Triggers or both. Ignored when etTable or etTrigger included in Extract Types. 26. TIBXScript: If an exception occurs during the processing of a statement, the statement separate character is now reset to the default (';'). 27. TIBDatabase: Reconnect method added and used by TIBXScript for reconnect. 28. TIBXScript: Transaction is no longer automatically reactivated immediately processing a commit or reconnect statement and instead activated only when next SQL statement is executed. 29. TIBSQL.HasField should no longer generate and exception when the field does not exist. 30. TIBXScript: case insensitive regex now used when matching statements instead of converting statement to upper case. 31. TIBExtract: metadata comments now supported. New published property IncludeMetaDataComments (default true). If true then metadata comments included in extracted DDL. New Extract Object member eoComments. This may be used with ExtractObject method to list all metadata comments. 32. TIBExtract: ListObjectNames method added. 33. Updated Database component editor to support additional connection string types. IBX Change Log version (2.2-0) Wed, 28 Feb 2018 10:57:45 +0000 NOTE: THE LOCATIONS OF SOME OF THE UNIT DIRECTORIES HAS CHANGED FROM IBX 2.1. THIS IS TO AVOID DUPLICATE PPU WARNINGS. PLEASE REMOVE EARLIER VERSIONS OF IBX BEFORE INSTALLING THIS RELEASE. NOTE: THE DBADMIN DEMO REQUIRES THAT THE MemDSLaz PACKAGE IS INSTALLED IN THE LAZARUS IDE. 1. IBExtract: Identity columns - add additional check for null column for generator name. 2. IBCustomDataSet: Insert and Modify (Update) queries now recognise and process SQL RETURNING clauses. The main use for this is for Firebird 3 Identity columns (see IBXDocumentation 6.6.8 for further information). However, this is also a very useful mechanism for returning updated computed by column values. Values returned as a result of executing an Insert or Update statement replace existing values in the current row for each corresponding column. Previously, if a dataset's select query included read only (computed by) fields then an automatic row refresh was performed after an insert or update query had been processed, irrespective of the setting of the "ForcedUpdates" property. This has changed such that an automatic refresh is no longer performed if an insert or update query contains a returning clause that updates one or more fields on the current row. A full row refresh is only performed if (a) ForcedRefresh is true or (b) the query does not return any field values and the select query contains read only fields. Use of Insert/update returning should be significantly more efficient than executing a refresh query. This behaviour change is intended to be backwards compatible and there should be no need to change existing programs, other than to improve performance by using the new capability. 3. IBCustomDataSet: DELETE...RETURNING queries are now also recognised. However, as they are called when the dataset row is being deleted, there is no value in updating the current record from the query result. Instead, a new event handler "OnDeleteReturning" is provided. If a DELETE...RETURNING query is execute and an OnDeleteReturning event handler is provided then it is called with the IResults returned by the query. The event handler can then interrogate the query results and perform whatever action is necessary. For example to confirm, to the user, the deletion of a row with the returned values. 4. TIBTable: generated Insert and Update SQL now include a RETURNING clause for any Computed By or Identity Columns. The IBTables example has been updated to illustrate the computation of the employee Full Name on update. 5. TIBTable: The GeneratorField property is now published. 6. The InsertSQL property editor now shows Firebird 3 Identity columns separate from the Field List. When InsertSQL is generated, the Identity columns are not included in the list of values to be inserted. A RETURNING clause is added to the insert statement to return the value of each Identity column after the insert is executed. 7. The Modify Property Editor now generates Update SQL with Computed By fields in Update..Returning clause. Similarly Insert Property Editor now generates Insert SQL with Computed By fields in Insert..Returning clause. 8. TIBGenerator: small performance improvement by not preparing query each time a new value is generated. 9. TIBSQL: Free resources when transaction changed - ensures new transaction is used. 10. Property editors will now sync table name to a System Table when "Include System Tables" is selected and the query is for a System Table. 11. Minor Performance improvement to handling of Date/Time types in IBX datasets. Field values are no longer converted to milliseconds from TDateTime and then back again to TDateTime (the conversion to milliseconds is the default TDataset approach). 12. Property Editors handling of Stored Procedures. * Select and Refresh: only show a list of stored procedures that return multiple rows (proc type 1) and which have a non-empty list of output parameters (i.e. stored procedures that may be used in a select query). * Modify and Insert: only show a list of stored procedures that return at most a singleton row (proc type 2). 13. IBStoredProc: Now supports Firebird 3 Package Names. A new published property PackageName can be used to select a package. If non-empty, the stored procedure name is expected to be a stored procedure defined in the specified package and the generated SQL will be as required for a stored procedure located in a package. 14. Select, Refresh, Insert, Modify, Delete and TIBSQL SQL Property Editors now include a "Package Name" drop down box to allow selection of a Firebird 3 Package from which a stored procedure can be selected. With no package name selected, non-package stored procedures are listed. 15. TIBXScript: turn off database login prompt when reconnecting - this avoids prompting for password on reconnect. 16. TIBDatabase: use IAttachment for connection default character set id, code page and character set name. 17. TIBDatabaseInfo: cache ODS Version information on first request in order to minimise DB info lookups" 18. IBExtract: now supports DDL Triggers and Grants to DDL objects. 19. Add a property Editor for TIBUpdate.RefreshSQL. 20. IBUpdate: Ignore non-data (e.g. calculated) fields when assembling list of input parameters. This stops an exception being raised when the field cannot be located in the record buffer. 21. Property Editors now automatically include System Tables when opened and when the query table is a System Table. 22. IBServices: SQRB and SRB buffers are now reset when service query throws an exception. This avoids errors due to a stale SQRB or SRB being used for the next query. 23. IBServices: Service attach parameters now include "expected_db". This is used to add the SPB item isc_spb_expected_db. This names a database using an alternative Security Database (FB3 onwards) and allows (e.g. backup/restore) using such a database. examples/services re-written to illustrate use of "expected_db". 24. IBServices: TIBControlAndQueryService.WriteNextChunk no longer ignores isc_info_svc_timeout. This avoids truncated backups when the server returns a timeout (busy) response. 25. TIBDatabase: isc_dpb_page_size now supported as a database parameter when using TIBDatabase.CreateDatabase. 26. TIBDatabase: DatabaseName property may now be prefixed by $TEMP$ or $DATADIR$ for local databasenames. These are respectively expanded to the local system's temp directory (including trailing delimiter) or to a prescribed data directory (including trailing delimiter). Under Unix systems the data directory is a hidden directory in the user's home directory. The hidden directory name is either the string returned from the SysUtils "Vendor Name" or "IBX" if empty. In either case prefixed by a '.'. Under Windows, the directory is the same as the Data Directory as decribed above but instead prefixed by the User's application data path. These may be used to improve application portability for Personal Databases. 27. TIBTable: FieldDefs property is no longer published. Due to the use of TIBFieldDef this has not worked for a long time and is not useful either. FieldDefs should be managed using the Fields Editor as with any other dataset. To access the fields editor for a TIBTable component, double click on the component. The fields editor is then displayed. 28. TIBDatabaseInfo: new properties/function * DateDBCreated (returns date/time database created) * TransactionCount (returns no. of active transactions) * GetDatabasePage(PageNo: integer) (returns contents of specified database page - SYSDBA only). * PagesFree (Firebird 3 or later) * PagesUsed (Firebird 3 or later) * Encrypted (returns true if database encrypted. (Firebird 3.0.3 or later only) * EncryptionKeyName (returns the name of the encryption key if any (Firebird 3.0.3 or later only) 29. IBServices classes now provided the decoded release number in the (array) property ServerVersionNo. 30. TIBSecurityService now supports display/modification of the User Admin Role (Firebird 2.5 and later). 31. TIBConfigService now has a procedure SetAutoAdmin(Value: boolean) to enable/disable the automtic mapping of privileged OS users to the RDB$ADMIN role (Firebird 2.5 and later). 32. TIBBackupService: New Option - NoDBTriggers equivalent to -nodbtriggers switch introduced in the gbak utility at V.2.1 to prevent database-level and transaction-level triggers from firing during backup and restore. 33. Both TIBBackupService and TIBRestoreService now support backup/restore statistics options for verbose output using the new property "StatisticsRequested". see https://firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-util-gbak.html#rnfb25-util-gbakstats 34. TIBRestoreService: now supports new options RestoreMetaDataOnly (Firebird 2.5 and later). 35. TIBOnlineValidationService component added to the IBServices and the "Firebird Admin" palette. This uses the online validation feature added in Firebird 2.5. The services's properties enable inclusion/exclusion of tables and indexes using regular expressions. See. https://firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-apiods-api.html#rnfb25-apiods-api-onlinevalidation 36. IBServices: procedure TIBConfigService.SetNoLinger added to set no linger option on a database. 37. TIBCustomService: Assign method implemented to allow copying of service login context between service API components. "Detach" method now only detaches service when last reference to the service interface detaches. Tidy up of code for SetActive and Attach methods including password hiding. 38. TIBDatabase: new properties: AuthenticationMethod and RemoteProtocol. Read only and used to determine the auth method and protocol used for the connection. 39. TIBDatabase: ensure that SQLDialect setting is used when creating a database using a Create Database Statement generated by IBX. 40. All IBServices now have an additional published property "PortNo". This may be set to a non-standard port number when necessary. If zero then the default port number is used. 41: TIBLookupComboeditBox: Ensure dataset updated when change selected with the keyboard and not just the mouse. 42. TIBCustomDataset: reopen query if already active when a TIBControlLink is added. 43. TIBTreeview: new ImageIndexField and SelectedIndexField Property allows the image index and selected image index for each node to be set from a database field. 44. TIBExtract: new extract type (etGrantsToUser) for use with eoDatabase. If included then database schema includes grants to all users. If not present then the only user grants included are those to User PUBLIC. 45. TIBTreeView: performance improvement. When expanding include both expanded node and child nodes in dataset. IBX Change Log version (2.1-0) Fri, 15 Dec 2017 12:20:11 +0000 1. IBCustomDataset: Minor change of PChar to PByte for compatibility with fbintf changes. 2. IBCustomDataset: Fixed use of incorrect datasize in TIBStringField.SetAsString. Bug could result in truncated multi-byte character set values. 3. Changes consequential on moving fbintf character set utility functions from IFirebirdAPI to IAttachment. 4. Avoid "Object is nil" error when opening a database with DefaultSystemCodePage = true 5. IBLookupComboEditBox: avoid race condition when autocompleting text that occasionally results in autocomplete ignoring prefix text. 6. IBLookupComboEditBox: Ensure that cursor is not reset to start of text when entering a new name into the text box. 7. IBCustomDataset: ensure that TIBStringField uses the field size reported by Firebird rather than recomputing it. 8. Property Editor positioning tidy up: All IBX Property editors should now be screen centre. Previously some were "poDesigned" which may be inappropriate for multi monitor desktops. 10. TIBTreeView.FindNode: protect against error if zero length path or empty tree node. 11. TIBTransaction: On Force Disconnect do not raise an exception when problem ending a transaction and always reset the object. 12. TIBQuery tidyup: remove unnecessary call to GetAffectedRows. 13. TIBXScript: Allow for override of database filename in Create Database statements. 14. IBLocaldb: Support initialisation of the database from an SQL script in addition to a gbak format archive. 15. IBLocaldb: fix problem that stopped the OnSharedDataDir event from being recognised. 16. IBLocaldb: Drop database if error creating an empty database. 17. TIBTreeView: improve performance when selecting node - avoid refreshing dataset unless selected node not in current dataset. 18. IBServices: SetDBParams method moved from TCustomIBLocalDBSupport (in IBLocalDB package) to TIBCustomService, and IBlocalDB code tidy up. 19. IBTreeView: Initialise TIBTreeNode KeyValue to null to avoid unpredictable behaviour due to uninitialised variable. 20. IBServices: Correct encoding of isc_spb_prp_write_mode in TIBConfigService from integer to byte. Ditto isc_spb_prp_reserve_space and isc_spb_prp_access_mode. 21. IBSQL: When Database changed ensure that all resources are freed. 22. IBCustomDataset: When database changed ensure that queries an unprepared. 23. SQL Property Editors now use SynEdit with SQL Highlighter. New features include: * Line Wrap on SQL Token boundaries (on user command) * auto-complete table names in drop down list of table names * Double click on tablename or field name adds to SQL text 24. IBDataOutput: print statistics using float (%f) format instead of decimal (%d). 25. IBTreeView: Call to FindNode: param type change from "array of Variant" to TVariantArray. Seems to avoid memory corruption in Windows (probably a workaround for a problem in fpc 3.0.4 win64). 26. IBDatabaseInfo: Code tidy up. Add check for database not assigned or not open. 27. IBDatabaseInfo: Remove memory leak when accessing database operation counts. IBX Change Log version (2.0-2) Fri, 24 Feb 2017 12:17:53 +0000 1. TIBDatabase.CreateDatabase: extract full DB Name from SQL using reg ex in order to include remote system name. 2. TIBExtract: No longer include comment header and COMMIT statement for empty tables when data included in output. 3. Profiling: IBSQL now has conditional compilation flags to enable query performance and timing information to be written to stdout. This may be used to locate performance bottlenecks. 4. SQLParser: only call "OnChanging" event handler when value is different. 5. IBDynamicGrid: Update handling of navigation keys for a TDateEdit 6. IBCustomDataset: Set internalunprepared flag when transaction ends. This ensures that BindFields is called when the query is next activated. Avoids FieldName not found error. 7. IBUpdate: This is a new IBX component similar to TIBUpdateSQL. It is more general purpose and allows the programmer to define any action they want for Update, Insert or Delete. This may be complex SQL (similar to a Trigger), application specific filtering of updates, or use of statements such as Grant or Revoke instead of normal DML. See User Manual for more information. IBX Change Log version (2.0-1) Mon, 09 Jan 2017 15:31:49 +0000 1. TIBEvents: Fix uninitialised variable that could result in lost events. 2. TIBExtract: Added support for FB3 "USAGE" privilege. 3. TIBExtract: data formatted as Charset set "octets" is now output using hexadecimal notation. 4. TIBExtract: Binary Blobs and array data can now be embedded in INSERT statements using a simple XML format. 5. TIBExtract: extract of individual Triggers and Stored Procedures can now include grants to these objects. 6. TIBExtract: Stored Procedures and Views output in dependency order to avoid dependency problems restoring complex databases. 7. TIBXScript: This component has been restructured to allow for the processing of embedded XML in INSERT statements and to support interactive sources in addition to non-interactive data sources such as files. 8. TIBXScript: CREATE DATABASE, DROP DATABASE, CONNECT statements are now supported. 9. TIBXScript: ISQL compatiable Set statements are now supported: SET SQL DIALECT SET TERM SET AUTODDL SET BAIL SET ECHO SET COUNT SET STATS SET NAMES 10. IBVersion unit added to hold current IBX Version Number information. 11. TIBExtract: Use character rather than byte length for VarChar procedure arguments., and domain definitions. 12. TIBExtract: Triggers now use SQL2003 syntax and database and transaction triggers fully supported. 13. TIBExtract: when a database dump includes data, the generator values are now also set. 14: IBSQLEdit: Unit LCLPlatformDef added to uses clauses for lazarus 1.7 and later. IBX Change Log version (2.0-0) Tue, 06 Dec 2016 10:33:44 +0000 See also doc/IBX4LazarusGuide.pdf for important information on upgrading to IBX2. 1. Size property of TIBStringField is now the width in characters of the field and not the byte length. This applies only to multi-byte character sets such as UTF8. The original approach aligned with TStringField. However, the TStringField code is not recognised as a bug and hence this change to align the behaviour. The TStringField change is expected in fpc 3.2.0. 2. A new property AutoFieldSize: boolean has been added to TIBStringField. When true (default) then Size property value saved in the lfm is ignored. Size is always set from the dynamic information read from the database. It is unclear why anyone would want to override this and set Size to false. 3. ibxscript: should now handle correctly a Case..End statement within a procedure block. 4. IBDatabase: new property - CreateIfNotExists. If true and database does not exist when an attempt is made to connect to it (run time only) then an attempt is made to create the database. 5. IBDatabase: new event - OnCreateDatabase. This event is called after a database has been successfully created as a result of a call to CreateDatabase or when creating a database after it was found not to exist. 6. DBControlGrid: a race condition could result in the wrong row image being written to the cache. This has been avoided by a trip round the message loop before rendering the row image. 7. DBControlGrid: It is strongly recommended not to open the source DataSet for a DBControlGrid during a Form's "OnShow" event handler. Under GTK2 this is known to risk corrupt rendering of row images when the control is first displayed. If necessary use "Application.QueueAsyncCall" to delay opening of the dataset (see DBControlGrid examples) until the Form's Window has been created. 8. DBControlGrid & IBDynamicGrid: Navigation keys should now work correctly with a TDateEdit control located on an editor panel. 9. TIBExtract: brought up-to-date plus many bug fixes. 10. DBControlGrid: Removed memory leak when updating rows. 11. TIBCMLocalDBSupport: fixed invalid free on upgrade. IBX Change Log version (1.4-3) Thu, 22 Sep 2016 18:10:15 +0100 1. IBCustomDataset: When calling SetCodePage, no longer request transliteration when target codepage is CP_NONE. This is a workaround for http://bugs.freepascal.org/view.php?id=30622. 2. DBLog option removed from TIBStatisticalService - not supported by server since Firebird 1.5. 3. ibxscript: An error is no longer generated for "on commit preserve rows" or similar. 4. IBCodePage: updated mapping between codepages and character id. 5. ftWideString and ftWideMemo withdrawn. There is no UTF16 character set in Firebird. Character sets with a char width of two are not UTF16. 6. Strings received from the database are now always transliterated into UTF8 regardless of the database character set or connection character set. This is for compatibility with the LCL. IBX Change Log version (1.4-2) Thu, 22 Sep 2016 15:25:27 +0100 1. IBBlob: Defer reading of blob until read method called. This avoids having to read in an entire blob just to get the size of the blob. General performance improvement when opening datasets containing blobs. 2. Clearing a Blob now sets the corresponding field's modified flag. 3. IBLookupCombo: When not performing auto-complete, original query sort order is now used. 4. IBDynamicGrid: Add OnSelectEditor event. Allows editor panel to be dynamically determined. 5. IBDynamicGrid: Recompute column widths after dataset closed and re-opened. 6. IBLookupCombo: LazUTF8 added to uses clause to avoid compilation problems post lazarus 1.6.0 7. IBControls. Removed "runtime" from list of paths to avoid "multiple packages" compilation error. IBX Change Log version (1.4-1) Tue, 17 May 2016 09:14:51 +0100 1. No character set specified for connection: when a text blob is retrieved, the character set is determined by looking up the native character set using then Firebird API. Otherwise a text mode blob is assumed to have the same character set as the connection. 2. TIBGUIInterface: this is an internal interface. Minor type changes to allow for Login Dialog returing a change to the database path. 3. Design Time Database and Server login Dialogs now allow the Database Name/Server Name to be changed from that given in the TIBDatabase/TIBServer component and for the entered value to be saved on a project specific basis (design time only). 4. IBDynamicGrid: TDBLookupCellEditor now compares its DataFieldName with the column fieldname. If they are the same then it is acts as a look up for the KeyValue Otherwise, it sets the column text to the selected ListField Value. 5. IBDynamicGrid: Only visible columns are now taken into account When recalculating column width. 6. IBLookupComboEditBox: Fix error with autocomplete query when a RelationName is given and a case insensitive search is requested. 7. IBDynamicGrid: No longer ignores notifications removing Column Totals controls or column ListSource. 8. IBQuery: no longer performs unnecessary refresh of SQL Text (and hence avoids an unprepare) when closing and the text has not changed. 9. IBSQL: Base the cursor name on a GUID instead of a hexstr version of the class pointer. Less likely to cause a cursor re-use error on Windows. 10.SV5IPC: include workaround for OSX. FPC 3.0.0 has broken ipc module for darwin. Expected to be fixed in 3.0.2. Hence workaround only applies to 3.0.0. 11. TIBTreeView: Guard against nil destination on record changed 12. AnsiString Code page support: TIBStringField.AsString and TIBMemoField.AsString now return a string type with the code page set to reflect the returned field encoding after Firebird driver transliteration, if any. FPC 3.0.0 onwards only. Behaviour unchanged for earlier versions. 13. AnsiString Code page support: Assigning to TIBStringField.AsString and TIBMemoField.AsString will now result in transliteration to the code page specified for the Firebird driver if the assigned string has a different code page. FPC 3.0.0 onwards only. 14. TIBDatabase: new property UseDefaultSystemCodePage. When set any lc_ctype parameter is ignored and the lc_ctype value, when the database is opened, is set to align with the DefaultSystemCodePage (FPC 3.0.0 onwards). Normally, this is what you want and should ensure platform independence. Note: this applies to FPC 3.0.0 and earlier versions. Pre FPC 3.0.0, when this property is true, the lc_ctype is UTF8 except under windows when the GETACP is used to determine the Windows code page. 15. TIBDatabase: new property DefaultCharSetName. This is the Firebird character set name used as the lc_ctype when the database was opened. Only valid while the Database is connected. 16. TIBDatabase: new property DefaultCodePage (FPC >=3.0.0 only). This is the codepage id that corresponds to the DefaultCharSetName. IBX Change Log version (1.4-0) Mon, 15 Feb 2016 14:44:24 +0000 1. Unix: If Firebird Embedded Server shared object is loaded and a local database path is given and database attach fails due to access permission issues on the temp directory or security database, then the attach is retried with "localhost:" prefixing the databasename. This should avoid problems when the database has to be accessed by a local (e.g. classic) server and libfbembed is used. 2. Windows: revised search order for Firebird DLL: i. The Firebird Embedded Server in the application Directory. ii. If the FIREBIRD environment variable is set then the directory this points to is searched for the FB Client DLL and then then underlying "bin" directory. iii. Registry Key HKEY_LOCAL_MACHINE\SOFTWARE\Firebird Project\Firebird Server\Instances is used to locate the Firebird installation directory and the underlying "bin" directory is searched for the FB Client DLL. iv. The Default installation directories C:\Program Files\Firebird\Firebird_2_x are searched for the FB Client DLL. v. The PATH Environment variable is used to search for the FB Client DLL. vi. Finally the PATH Environment variable is used to search for IBASE.DLL. 3. New Component: TIBXScript. This is an ISQL compatible SQL script execution engine. See doc/readme.scriptengine and example applications. 4. New Component: TIBlocalDBSupport. This is a TIBDatabase support component intended to simplify the use of the embedded firebird server on both Linux and Windows platforms. See dpc/readme.localdatabase and example applications. 5. IBDynamicGrid: Reordering on column header click should now also work for dynamic columns. 6. ISQLMonitor: (Windows only). Mutex added to TMultilockGate to avoid race condition between incrementing/decrementing the lock count and signalling the event. IBX Change Log version (1.3-2) Tue, 26 Jan 2016 14:39:54 +0000 1.3.2 was never formally released and only made available as beta copies. 1. DBControlGrid,IBDynamicGrid: Ignore down arrow and up arrow in TCustomMemo 2. IBDynamicGrid: Now deals correctly with a single column grid which has no indicator and autosize column 3. IBLookupComboEditBox: reset timer on each key press - avoids timer going off too early 4. IBDynamicGrid: Call event OnUpdateSortOrder even when aliasname not found in dataset i.e. when it is a calculated field 5. IBDynamicGrid: Fix problem selecting a different row when expanded row at end of grid. This problem was due to a race condition between recalculating row heights and determining which row was selected by the mouse click. The row height calculation is now deferred by an extra trip round the message loop allowing the row to be always calculated on the current grid layout rather than risking it being calculated on the grid layout after the expanded row has been shrunk. 6. IBLookupComboEditBox: avoid race condition between cm_killfocus and cm_exit on Windows. 7. TIBStringField: Now has two new public properties: CharacterSetName: string and CharacterSetSize: integer; These properties allow the (Firebird) character set name for the field and the max number of bytes per character to be determined at runtime. See doc/readme.charactersets.html. 8. TIBWideStringField: This is a new field type with the same additional public properties as above and subclassed from TWideStringField. This field type is used with the character size reported by Firebird is two. See doc/readme.charactersets.html. 9. TIBMemoField and TIBWideMemoField: new field types with the same additional public properties as above and subclassed from TMemoField and TWideMemoField respectively. These field types are used with Blob subtype 1 and a characterset size of 1, 3 or 4 (TIBMemoField) or 2 (TIBWideMemoField). See doc/readme.charactersets.html. Both also have a new published property "DisplayTextAsClassName". If false (default) the displaytext is generated from the blob text by truncating the string to the displaywidth (in characters not bytes). A displaywidth of zero implies no truncation. 10. IBLookupComboEditBox: Force autocomplete when EditingDone called and timer active. 11. IBDynamicGrid: Call DataSet.Append when entering edit mode and dataset empty and not in insert state (avoids "Not in Edit Mode" error). 12. IBDynamicGrid: Correctly resize grid when one column width plus indicator. 13. IBDynamicGrid: Ensure Editor Panel has focus when shown - avoids Windows API calling DBGrid.DoExit on subsequent mouse click (e.g. on child control such as a tabbed page control. 14. IBDynamicGrid: ignore up, down tab and return when editorpanel open and focus in a TCustomGrid descendent. 15. DBControlGrid: Stop flashing grid when dataset closed and then re-opened while DisabledControls 16. IBQuery: Bug fixed that prevented SQL being set programmatically once the Parser had been invoked. 17. IBCustomDataSet: On close, parser is now freed and Select SQL reverts to value before DataSet Opened. IBX Change Log version (1.3-1) Sat, 18 Jul 2015 13:30:50 +0100 1. OnCloseUp Event Handler added to TDBLookupProperties 2. IBDynamicGrid: Call to OnEditorPanelHide is now last editor hide action - avoids problem with row size when exception is called. 3. IBLookupComboEditBox: Force pending autocomplete on combobox exit. 4. IBDynamicGrid and DBControlGrid: Keyhandler now ignores up, down, escape and return keys if in a TCustomComboBox and ignores return key if in a TCustomMemo 5. IBLookupComboEditBox: Ensure that KeyValue is set correctly when full text keyed in i.e. when autocomplete not performed 6. Cleanup of "Uses" clauses and add console mode support. IBX should now support console mode applications with all LCL required functions (builtin dialogs and cursor management) centralised in the IBDialogs unit. As long as "IBDialogs" is not included in your project, IBX should compile and link with a console mode program. See consolemode example and its "readme"for further guidence. DO NOT add the ibexpress package to a console mode application or the IDE will automatically assume that your application is GUI based. Instead, you should include the ibexpressconsolemode package. IMPORTANT NOTE: IBDialogs must be included in GUI applications in order to use the built in dialogs and cursor management. IBDialogs is included by default if "ibexpress" is in your project source's "uses" clause. This should be the case for all projects created through the IDE. This is why you do not want to add the ibexpress package to console mode applications. The ibexpressconsolemode package has been created to allow console mode programs to avoid adding LCL dependencies when using IBX, while still having the unit search paths set up correctly. Existing users should check to ensure that the "ibexpress" unit is included in each project's source file (*.lpr). You may find that in order for the IDE to recognise that ibexpressconsolemode exists, you have to first open the package in the IDE and then close it. This adds it to the most recently accessed packages list. To make it permanently available, add the package name to lazarus' staticpackages.inc file. Thanks to Julio Jiménez for suggesting support of console mode. 7. SQL Parser can now accept quoted strings that include new lines 8. IBDynamicGrid: Lookup Cell Editor - the cursor is now positioned at end of text on start of edit. This is particularly useful when tabbing to a column and then inserting text. 9. New Examples provided for IB Services and ISQLMonitor. 10. Fix error when writing to blob streams that recorded only the last buffer write in the blob stream. In most cases, this did not cause a problem as the IB Blob Stream is written in a single write. However, with the TDBImage, write of a graphic type prefix was lost which caused a problem when the image could not be automatically recognised. 11. Improve generation of random cursor names in TIBSQL - avoid risk of "cursor already open" errors due to random numbers used for the cursor name being identical. 12. IBTable: corrected error that could result in an "Index out of bounds" error when opening the table and the Primary Key is the last or only column in the table. Thanks to Rick Hoover for the fix. 13. Fix TIBDatabase initialisation of lc_ctype under unix. Set to "UTF8" instead of "UTF-8", and update list of available database character sets. Existing users should check the current lc_ctype setting in their applications. IBX Change Log version (1.2-4) Sat, 09 May 2015 12:38:29 +0100 1. Firebird Services: avoid List Index error when opening a service with an empty Params property. 2. IBControls: Fix problem with new link mechanism introduced in 1.2.3. Link now set up in Loaded method - avoids occasional failure to apply SQL markup on initial open. 3. "Employees" example performance improvements when scrolling. 4. DBControlGrid: Correctly handle edit panel removal when panel is child control of a TFrame. Force recaching of selected frame to avoid GTK race (results in a random image cached). 5. DBControlGrid: Should now react to changes in panel height at run time. 6. IBDynamicGrid: Redraws rows below on panel editor hide - avoids blank space at end of grid even when further rows exist. 7. DBControlGrid: DefaultRowHeight is no longer a published property as it should always be derived from panel height and setting this property can cause confusion. Note for existing projects: to avoid a missing property error at run time, each form using the DBControlGrid must be opened, updated and saved in the IDE in order to remove the property value from the lfm. IBX Change Log version (1.2-3) Tue, 14 Apr 2015 14:11:17 +0100 1. TIBStoredProc. Prepare now called by ParamByName to avoid need to always call Prepare before setting parameter values. 2. Error message on ParamByName (all cases) not found now includes name of missing parameter. 3. Code tidyup and more robust handling of dsql information result vector. 4. Support for centralised handling of transaction status changes. TIBTransaction has been given additional events "AfterEdit", "AfterInsert", "AfterDelete", "AfterPost" and "AfterExecQuery". The first three are called after the same event is called for an IBCustomDataSet descendent using the Transaction. The fourth is called after a call to TIBSQL.ExecQuery, again using this transaction. These new events enable monitoring of transaction status changes for a given transaction to be handled in a single place. For example, when a change to the dataset occurs an indicator can be set that shows the user that in order to save changes, the transaction should be committed. Rather than doing this per dataset, this can now be done per transaction. 5. TDataSet.CheckBrowseMode automatically posts changes to the current row when the dataset is scrolled. However, any changes to the current row are, by default, discarded when the dataset is closed. TIBDataSet, TIBQuery and TIBTable now have a new property "DataSetCloseAction" that adds automatic posting of changes on dataset close. If this property is set to dcDiscardChanges (default) then the behaviour is unchanged from previous versions. if the value is set to dcSaveChanges then IBX will attempt to post any unsaved changes before the dataset is closed (and after the BeforeClose event handler is called). The exception is when the dataset is being closed as a result of a transaction rollback. In this case, no action is taken and any unsaved changes are discarded. This avoids both unnecessary overhead and the risk that a validation error may occur in the Post raising an exception and thereby preventing a rollback. 6. String Field sizes and Display Widths should now be correct for multi-byte character sets. In earlier versions, the Display Width was set to the maximum byte width rather than the character width. Display Widths are now corrected by dividing by the max byte width per character. For UTF8 character sets, the byte width is four and hence the Display Width will be the byte width divided by 4. The byte width of each character set is determined dynamically when the database connection is estabished from the RDB$CHARACTER_SETS system table. (see also http://bugs.freepascal.org/view.php?id=27766). 7. SQLParser will now correctly parse SQL Text which contains ':' within quoted string. 8. IBLookupComboEditBox: List should now always be restored to full list when the control loses focus. Default Key press default interval reduced to 200ms. 9. DBControlGrid: Ensure that selection is changed to newly appended row, even when dataset rows are less than visible rows. 10. IBDynamicGrid: Editor Panel is not shown on indicator click if Datasource does not exist or DataSet is empty. More responsive on dataset open. New event OnRestorePosition. Column sort disabled if no header row. 11. IBTreeView: improved handling of response to "Add Node". Avoid scrolling dataset while dataset state is dsInsert. Avoids posting errors. 12. IBControls: New mechanism for distributing UpdateSQL and UpdateParams events. This is to avoid conflict with DisableControls/EnableControls with Master/Detail linked tables. 13. IBLookupComboEditBox: Now avoids SQL Errors when combo box text contains single quotes. 14. TIBDataSet and TIBQuery: new Event - OnValidatePost. This event has been introduced to solve a specific problem. That is when the dataset cursor is moved (e.g. by a grid mouse click and the current row is being edited or inserted. In this case, TDataset always "posts" the current record regardless or whether or not it may be more appropriate to cancel any changes; the post occurs before the "BeforeScroll" event fires due to the way the "MoveBy" function is implemented by TDataSet. The OnValidatePost event is called as the first action of the "Post" method and allows the handler to convert the Post into a Cancel if that is the appropriate action on moving to a different row. This is achieved by returning with "CancelPost" argument set to true. Note that an exception could be raised here, but it may still be more appropriate to validate a post and signal a problem in the "BeforePost" event handler. See readme.automaticposts.xhtml) 15. On Unix derived systems, the Firebird library name can now be given as a colon separated list. Each library name on the list is tried in turn, in left to right order with the first found being used as the firebird library. By default, on Linux, the library name list is 'libfbembed.so.2.5:libfbembed.so.2.1:libfbclient.so.2'. This can be overidden by the FBLIB environment variable or the OnGetLibraryName function. Note: when using the libfbembed.so, if you prefix the database name with "localhost:" then it will still attempt to access the database via the Firebird Server and will require a username and password. If only the pathname is given, then the username and password should be omitted and the unix file permissions are used to grant access. IBX Change Log version (1.2-2) Sat, 14 Mar 2015 11:35:04 +0000 1. A new IBControl - TDBControlGrid has been added. TDBControlGrid a lookalike rather than a clone for the Delphi TDBCrtlGrid. TDBControlGrid is a single column grid that replicates a TWinControl - typically a TPanel or a TFrame in each row. Each row corresponds to a row of the linked DataSource. Any data aware control on the replicated (e.g.) TPanel will then appear to have the appropriate value for the row. 2. As suggested by Julio Jiménez, a new property "SQLHourGlass" has been added to TIBDatabase. When set to false (default true), the Hour Glass cursor is supcpressed and no cursor change takes place during database access. This may be useful when there are performance issues with the change of cursor. Setting the property to false suppresses the change of cursor. 3. As suggested by Julio Jiménez, a new property "AutoCommit" has been added to TIBDataSet, TIBQuery and TIBTable. When set to acCommitRetaining (Default: acDisabled), a call is made to Transaction.CommitRetaining immediately after every Post or Delete. This has the effect of making all changes permanent immediately rather than when the transaction is explicitly committed. 4. Experimental support for the Firebird 3 SQL_BOOLEAN type has been added while still using the legacy Firebird API. Thanks to Gabor Boros for helping to test this feature. IBX Change Log version (1.2-1) Fri, 13 Mar 2015 11:14:15 +0000 Development version only. IBX Change Log version (1.2-0) Thu, 26 Feb 2015 10:34:04 +0000 1. An internal select SQL Parser is now available for TIBCustomDataset descendents. This is typically used during an "OnBeforeOpen" event handler to manipulate the "Where" and "Having" clauses to implement user specified filters of arbitrary complexity. 2. A new Component Palette entry "Firebird Data Controls" is now available. This has three new data aware controls dependent on IBX and which make use of the SQL Parser. These are: - TIBLookupComboEditBox - TIBDynamicGrid - TIBTreeview TIBLookupComboEditBox is a TDBLookupComboBox descendent that implements "autocomplete" of typed in text and "autoinsert" of new entries. Autocomplete uses SQL manipulation to revise the available list and restrict it to items that are prefixed by the typed text (either case sensitive or case insensitive). Autoinsert allows a newly typed entry to be added to the list dataset and included in the available list items. TIBDynamicGrid is a TDBGrid descendent that provides for: - automatic resizing of selected columns to fill the available row length - automatic positioning and sizing of a "totals" control, typically at the column footer, on a per column basis. - DataSet resorting on header row click, sorting the dataset by the selected column. A second click on the same header cell reversed the sort order. - Support for a "Panel Editor". That is on clicking the indicator column, the row is automatically expanded and a panel superimposed on it. The panel can have any number of child controls, typically data aware controls with the same datasource as the grid allowing for editing of additional fields and more complex editors. - Reselection of the same row following resorting. - A new cell editor that provides the same functionality as TIBLookupComboEditBox. Its properties are specified on a per column basis and allows for one or more columns to have their values selected from a list provided by a dataset. Autocomplete and autoinsert are also available. The existing picklist editor is unaffected by the extension. TIBTreeView is a data aware TCustomTreeView. 3. When getting a field value using FieldByName.AsVariant, an SQL_INT64 with a zero scale will no longer return an error. An Int64 will be returned instead. 4. TIBTransaction now has events for Before and After Transaction End and a new function "GetEndAction" allowing the EndAction to be accessed by these event handlers. 5. TIBQuery can now handle correctly queries which contain the same keyword parameter repeated multiple times. 6. TIBUpdateSQL will no longer return an error when "RowsAffected" is <> 1. This error check used to get in the way of using Stored Procedures, and "Update or Insert" statements. 7. Insert, Modify and Delete property Editors now support Query Generation from Stored Procedures. 8. Three new examples illustrate the use of the new IB Controls IBX Change Log version (1.1-0) Mon, 07 Jul 2014 14:01:07 +0100 1. TIBXSQLVAR code clean up and optimisation to improve client side "prepare" and parameter setting performance. See "readme.field+param.names in the doc folder.(Thanks to Gabor Boros for reporting this problem and for testing the improvements). 2. IBX can now support dialect 3 quoted column names that contain spaces and which differ only in their case. See readme.field+param.names in the doc folder. 3. IBX SQL Editors will now automatically add double quotes around column names when the database dialect is "3" and the column name contains spaces or is a Firebird 2.5 SQL Reserved Word. 4. Param Type LargeInt now supported in TIBQuery and TIBStoredProc 5. TIBSQL.ExecQuery retry on failure removed to avoid problems with "at most once" actions. 6. TIBTransaction.SetDefaultDatabase uses SetObjectProp instead of mis-using SetOrdProp (with thanks to Yuriy Kopnin for pointing this out). 7. GenerateParamName is now a published property of TIBSQL, TIBQuery and TIBDataSet. 8. varWord, varShortInt and varInt64 added to TIBXSQLVAR.SetAsVariant and hence now available as variant types for both fields and parameter setting. 9. Changes to the Select SQL in an IBCustomDataset descendent should now be visible in the Fields Editor immediately afterwards - rather than only after cycling the "active" property. 10. TIBSQL SQL editor will operate correctly and not report an SQL syntax error on SQL test, when DSQL ('?') parameter placeholders are used and the TIBSQL.GenerateParamNames property is set to true. 11. TIBTable now has a property editor for "MasterFields" 12. SQL Property Editors now include a checkbox "Allow DSQL Placeholder". This corresponds to the GenerateParamNames property and should be set when using DSQL (i.e. '?') style parameters. 13. The IBTransaction editor now has a radio button ("Unspecified") which is set when the combination of settings is unrecognised. Selecting this radio button has no effect on the settings. IBX Change Log version (1.0-5) Sat, 28 Dec 2013 19:22:23 +0000 1. TBookmark change conditional compile changed to >= 2.7.0 to match revised availability of change. IBX Change Log version (1.0-4) Thu, 28 Feb 2013 16:56:13 +0000 1. In a TIBCustomDataset descendent, a generator now only sets the value when it is null. This allows for alternative user defined setting of the generator Many thanks to Julio Jiménez for this fix 2. An Error Dialog is now displayed in the Lazarus IDE if IBX cannot find the Firebird Library and suggests that the user may have forgotten to install it. IBX Change Log version (1.0-3) Thu, 22 Nov 2012 22:53:39 +0000 1. Conditional compilation used to limit registration of TIntegerField to Lazarus versions less than 1.1 2. When a database connection is created, character set is now by default set to UTF8 (Unix) or to the current Windows code page (Windows) if in the range 1250 to 1254. IBX Change Log version (1.0-2) Tue, 09 Oct 2012 09:10:30 +0100 1. TBookmark change conditional compile changed to > 2.6.2 to match expected availability of change. IBX Change Log version (1.0-1) Sun, 05 Aug 2012 20:00:04 +0100 1. In IBCustomDataset. Changed CurBookmark from string to TBookmark for compiler versions > 2.6.0 Necessary because of TBookmark type and TDataSet.Bookmark property change in fpc 2.7.1 2. IBX now registers TIntegerField as a "No Icon" component. This may be removed if the fpc DB package is changed to do this (which it should do). IBX Change Log version (1.0-0) Sat, 28 Apr 2012 16:43:00 +0100 1. Add "if active then active := false" to TIBCustomDataset destructor. (Avoid error on database close). 2. Make use of $STATIC conditional in IBSQLMonitor (Needed for FPC 2.6.0 compliance) 3. Database Property Editor: Character Set drop down box now uses "OnChange" rather than "OnCloseUp" to react to changes 4. Property editors should now correctly resize. 5. In IBDatabaseEdit.TestClick, the LoginPrompt is now set to the state of the LoginPrompt Checkbox (restored original functionality) 6. Under OSX, if IBX fails to load libfbclient.dylib, it will now try and load the firebird library using the absolute path /Library/Frameworks/Firebird.framework/Firebird.