RELEASE NOTES for IBO Version 4.x

 

8/25/2007 Sub-Release 4.8 Build 7 (Beta)

 

I changed the order of the firing of the events in the TIB_Datasource component such that the associated TIB_DataLinks events fire prior to the events published on the TIB_Datasource.  It's not likely this will break anything but it is possible that it could.  I made this change because it was discovered the KeyLinks relationships were not properly executed at the time the TIB_Datasource.OnDataChange event was fired.  With this change, the KeyLinks relationship will all be fully executed and consistent.

 

I fixed a bug having to do with extra long VARCHAR columns and TDataset.  These are assigned to the TMemoField type and when I recently enhanced it with UTF8 character set support I failed to make it respect the null indicator properly.  It was not clearing out the previous records value when scrolled to a record that had a NULL value.  Thus, it made the record with NULL appear to have the previous record's value.  This is a very bad bug and everyone using this part of IBO should apply this sub-release.

 

I fixed a bug to do with the parsing of TIB_Script statements.  If the statement terminator was set to !! and then used right after the END like this END!! it failed to detect it as terminating the end of the statement.  It required as a workaround to put END !! with a space between them.  I fixed it so that it is not necessary to put a space prior to the terminator characters.

 

I fixed a bug in TIBOBaseTable when mixing together setting a range with SetRange() and changing the value of IndexName (or IndexFieldNames).  This caused the internal query to get confused about what columns were participating in the range.  What it does now is if you change the IndexName (or IndexFieldNames) property TIBOBaseTable will automatically cancel the range if it existed.  Thus, after changing the IndexName property it will be necessary to call SetRange() again to establish a range operation.  I am considering allowing a new method that will allow SetRange() to also include a new IndexName to be associated with it.  The reason is, this will allow the internal query to be impacted once and effectively not cancel the range when changing the index but just immediately use the new range values provided.  Please let me know if this would be of value and I'll try and implement it.

 

I added a public property to the TIB_Statement class called TreatSingletonEmptySetAsEof in order to avoid the exception that is normally raised when this condition occurs.  This new property is false by default such that the previous behavior is retained.  Unless this property is set to true in your code there will be no change in behavior. What happens if it is set to true and a query is executed that returns no rows is it changes the error code from isc_stream_eof ("attempting to read past the end of the stream") to the error code of 100 which is simply the normal Eof code.  Thus, it clears the output buffers and marks the Fields output row having a RowState of rsNone.  Active remains false and if it was Active it will be set to false.  The AfterExecute event will still be fired as well. Checking if the RowState is rsNone or if Active is true will distinguish between actually having a record returned or not. The StateChange and DataChange events will also be fired as usual.

 

8/8/2007 Sub-Release 4.8 Build 6

 

I adjusted the IB_Constants.INC file to exclude the error message message header so that it could be back in the body of the unit and be translated.

 

In IB_Constants-tr.pas:

{  Cagatay Tengiz <cagatay@tengiz.net>                                    }

{  06-Aug-2007                                                        }

{    Modification of file to be compatible with version 4.8.5           }

{    Added new constant string.                                         }

 

I added an extra check for whether the fetching of rows was aborted or not inside the code that performs a Locate().  Gunther Nau reported a case where if one of his users cancelled fetching that the program fell into an infinite loop.  While I could not duplicate it myself, Gunther sent me the place in code where it was stuck and that's where I put the added check.

 

I modified the TIB_Column.SQLTypeSource property to include a parameter telling whether just the base data type only is wanted. Along with this I fixed a bug where TIB_StoredProc was added in the name of the stored procedure with a period as a prefix to the parameter names when there was already a prefix with a period specified.  This resulted in a corrupted parameter name with multiple prefixes.

 

I cleaned some hard paths out of the Code Gear RAD Suite 5.0 runtime package project source file.

 

8/3/2007 Sub-Release 4.8 Build 5

 

Per Paul Hope's request, I made the TIB_Grid.VisibleGridRows virtual.

 

  function VisibleGridRows: longint; virtual;

 

I added the following properties to TIB_Grid so that the programmer can make use of them.

 

      {: Access to the value of an internal property.}

        property WasDblClick: boolean   read FWasDblClick;

      {: Access to the value of an internal property.}

        property MouseIsDown: boolean   read FMouseIsDown;

      {: Access to the value of an internal property.}

        property MouseWasMoved: boolean read FMouseWasMoved;

 

I also included a fix so that the mousewheel work in the TIB_CtrlGrid.

The fix was given by yukio makino [mailto:makino@piconet.jp].

 

I updated the language IB_Constants-XX.pas units.  There is a new string in there that should be translated.  I am still waiting for volunteer efforts to fill this in.  I moved the non-translatable constants out of the IB_Constants.pas unit file and put them in an include file called IB_Constants.INC so that these will not be redundantly maintained in all the separate language constants units.

 

I added the capability to make grid cells in the Browse form of IB_SQL hyper linked to open a child windo that has data from another table that links with the data being browsed.  This new feature is available by right clicking on a column and then choose the "Link Column As Foreigh Key" menu selection and you will be presented with a dialog that lets you put in the table you want to reference and in the list below you put in what columns in the dataset you are browsing link to what columns in the table being referenced.  If it is done wrong then there will be silent behavior.  It only works when you make a valid entry.  This can also be used to override the existing behavior to try and link tables together using the foreign key information from the metadata.  Also in IB_SQL Browse, it was also possible to accidently delete in the lookup list of tables.  I set this to read-only to avoid this problem.  I noticed that in the IB_SQL Source view of tables that the actions for foreign keys was showing the action in double quotes, which is invalid SQL.  I fixed it so that valid SQL will be generated in that pane.  Also, I noticed the IB_Connection.FieldsXXXX properties were not being streamed properly when using IB_SQL in stand alone mode.  It worked fine as the component editor for TIB_Connection.

 

I fixed a problem with the TIB_DatasetBar where it wasn't properly working with statements that don't involve a dataset but instead require the ExecSQL method to be called.  I was detecting the statement type and changing the glyphs so that it would be more intuitive as to what actions are available.  One of the glyphs was not appearing as it should and the hint was not being set as it should.

 

Thanks to Thomas Steinmaurer I fixed the bug introduced in the past version having to do with retrieving schema cache related information. The error was something like this:

Internal SchemaCache ERRCODE: 335544374 (D:\Programme\Borland\Addon\ibo\IB_Components.pas, Zeile 14518)

It happened when there was an execute procedure with input parameters named differently than as stored in the database when it was created.  It was also necessary to have the option to set column attributes based on the SQLType for this bug to bite. I don't often use this feature so my testing didn't catch this.

 

I modified the behavior of the TIB_StringList object.  Nearly everything in IBO that is a string uses this so this is a potentially widespread impact.  I am making this change because the impact should merely eliminate ambiguity that is unnecessary.  What I noticed is when a link entry was created in the stringlist is if the name side of the link was a TABLE.COL (fully qualified) that when it was stored it would drop the TABLE. prefix and just make the entry with COL=<info>.  This actually caused me some grief because this is not intended behavior.  It just happens to work because it will still link up with all that it would have previously.  The problem is only obvious when you need to store something and have it retain the table prefix to the link name.  I anticipate this should not have any negative impact on any applications unless it is specifically depending on the prefix getting dropped.  I rather doubt it.

 

I changed the default setting of internally created transaction objects to announce focus so that it is possible to turn on the receive focus capability of the transaction bar and have access to controling the transactions inside the datasets that are not assigned to one of their own or associated with a connection's default transaction.  If you are using the announcement of focus capabilities for transactions then this could impact your application.

 

I fixed another parsing bug that showed up when there were two very complicated select procedures with input parameters and they were left joined.  Everything executed fine but IBO was not properly parsing the RelAliasName for the columns.  This likely only affected things if the dataset was being used for updates or in a master-detail relationship at the same time.

 

I changed the C++ Builder intermediate directory to use $(BCB)\projects\lib instead of $(BCB)\inter.  Some versions were using one and some versions using the other and so I decided to make things consistent.  The automated installer will insure that this directory exists so if you install them manually please make sure to create this directory before building the packages.  I also realized I had not included the packages for the Web Snap extensions for C++ Builder 6.

 

I changed the installer to use a consistent location for the design-time packages.  It will now use a subdirectory just below the sources where IBO is installed.  Run-time and Run-time/Design-time packages will continue to be placed in the Windows\System32 directory.

 

I added an extra check for callback fetching handling of the Locate() method to help make it work more smoothe.  There was one case where records were being fetched in without the callbacks being issued and the user having an opportunity to cancel the operation.  I added a comment on how to use the FetchingAbortedGen property so that its possible to tell if an operation was aborted with accuracy.

 

 

7/24/2007 Sub-Release 4.8 Build 4

 

I fixed a bug in the IB_Monitor component.  There was a nil pointer causing an access violation because Firebird 1.5 doesn't implement the DLL export 'fb_interpret' and IBO assumed that it did.

 

I fixed the installation for D2007.  [ 8/3/2007 NOTE: There are some people who noticed not all packages being installed. ]

 

I nearly rewrote the button bar controls in order to make them have uniform features and to remove a problem where resource efficiency was introduced that caused some problems with other versions of Delphi. It is now possible to change the order of the buttons in code by populating an array with the button type in the order desired.  Please see the ButtonsOrder[] array property for more details.

 

7/23/2007 Sub-Release 4.8 Beta 3

 

I enhanced the parser to properly recognize the case of CREATE OR ALTER.  I also fixed a couple more spots in the parser.  I had a few more places where I was using case sensitive comparisons that should be case insensitive.

 

I added UTF8 character set transliteration support for long VARCHAR and CHAR columns that TDataset decides to handle using a TMemoField instead of a TStringField.  I have yet to finish UTF8 transliteration support for BLOB MEMO columns.

 

Added UTF8 to the CharSet pick list on the Connection tab of the IB_SQL tool and TIB_Connection component editor.

 

I made it so that IB_SQL will properly handle default values on input parameters of stored procedures when the Edit button is selected in the Browse form.

 

I made some improvements to the handling of RequestLive datasets with TIB_Cursor when doing cursor based updates.  It is now possible to process edits that were not allowed previously.  There are some bugs in Firebird surrounding cursor based updates so it is possible the server will return an error in some cases that it shouldn't.

 

When using TIB_StoredProc the input parameters will now be in the format of PROCNAME.PARAMNAME instead of just PARAMNAME.  This way I can quickly determine the name of the stored proceudre in use.

 

I made the ParamCheck and ParamChar properties published for the TIB_Cursor component.  I also added a Params checkbox to the component editor for the TIB_Cursor component.

 

I fixed a bug having to do with a custom master-detail arrangement that is managed using Filter and OnFilterRecord in combination with CachedUpdates being set to true.  There was a case when refreshing the detail dataset it was not properly applying the OnFilterRecord logic when deciding if cached insert records should be included in the active buffer for the detail dataset or not.

 

I added a new TDataset based sample application called Filters.  It's purpose is to demonstrate how to mix them with CachedUpdates as well as to facilitate a manually programmed master detail relationship using filtering instead of parameters.  This includes filtering that is resolved on the server as well as filtering that is performed on the buffers on the client.  This includes processing of the cached inserts in the buffers as well.

 

I enhanced the Samples application management of default server and database path information.  It will tolerate the base directory moving around better now.

 

I fixed a bug in the handling of macros that was introduced in the last beta version.

 

I put an improvement in the Company sample application that gives an excellent demonstration of lookup combo controls embedded in the TIB_Grid and to have the sorting work nice and clean when using the description from lookup tables.

 

I fixed a bug in the IB_RPL application.  There was a problem in the handline of BLOB columns during setup and loading of a replication index.  I also needed to add a TIB_SessionProps component so that it would provide default handling for the passive tasks, such as the event alterter that receives notification when there is something to replicate.

 

I fixed a bug in the IB_FTS application.  On some instances there was an OBJECT IN USE error when loading a full text search index. It seemed more pronounced with FB2 forcing me to figure out what was going on and to resolve it.  As it turns out, I needed to make sure all the work of the FTS metadata generation was being done in a single transaction at a time.  I had more than one transaction active simultaneously and this seemed to be the root of the problem.

 

I moved the IBF_Base.pas and IBF_Status.pas units/forms to the Core Runtime package IBO40_CRT.dpk as a result of including the option to profile the component instances when an exception is raised.

 

 

7/12/2007 Sub-Release 4.8 Beta 2

 

I fixed the parser having to do with extracting script statements from script files.  I had two places where I was using case sensitive comparisons that should be case insensitive.  This caused some statements to get parsed incorrectly having to do with the elimination of the need to use the SET TERM for statements that contain a semicolon in their body.

 

I fixed a problem with parsing where a statement SELECT FIRST 10 * FROM TABLE was parsing the '*' (asterisk) as the multiply symbol instead of as the filed group symbol.

 

I fixed a problem with parsing of the FROM clause in SQL SELECT statements.  It was not correctly dealing with ON clauses.

 

I fixed a problem with an infinite loop in the handling of error messages.  Thanks to Hans for pointing this out and suggesting a fix.

 

I enhanced the MacroBegin and MacroEnd properties.  Before, whatever was in them was doubled when looking for a macro. This made it impossible to use a two character token where the two characters were different.  The two characters would get doubled to 4 characters.  I made it now so that only when it is a single character does it look for it doubled.  If there is more than one character it will not look for it doubled in the SQL text.

 

I have added native transliteration for UTF8 character set when the database connection CharSet property is set to UTF8.  I don't yet have blob memo support finished, just the regular CHAR and VARCHAR.  Keep in mind, long varchar or char columns are handled by TMemoField with TIBODataset so you may want to force these to be a TStringField to avoid this problem.  I also will be looking into the use of the TWideStringField and getting it supported better for use with UNICODE and UTF8.

 

I received a report from a user that had a visual quirk with the DevExpress grid when used with TIBOTable.  He said upgrading to DevExpress grid version 5 or above resolved the problem.

 

I adjusted the logic for determining if a calculated column is readonly or not.  By default it will be readonly but it is possible to flag it with the ColumnAttribute of MODIFIABLE so that edits are allowed, but it is the responsibility of the programmer to make sure any edits are resolved to the UpdateSQL mechanisms so that the edits will post to the server.

 

I added the UTF8 CharSet setting to the property editor picklist.

 

I fixed the UpdateSQL tab's Generate for table capability to update the EditSQL, InsertSQL and DeleteSQL property settings.  It was not properly dealing with the use of relation alias names.

 

1/27/2007 Sub-Release 4.7 Build 16

 

IBO version 4.7 is now officially released.

 

There were a few sample apps that needed some touching up.

 

I fixed some issues in the IB_Actions that were minor, along with some code clean-up.

 

I fixed a problem with the IProvider support in the handling if updates for TDataset components.

 

 

1/20/2007 Sub-Release 4.7 Beta 15

 

I fixed a problem having to do with the handling of master-detail processing in conjunction with keylinks relationships.  In the Company sample application I noticed that the detail dataset would go into edit state when the master dataset was scrolled.  This was not supposed to happen at all.  It's only supposed to requery the detail dataset according to the new master record.

 

I included some changes by Hans in IB_SQL and in the DDL extraction component to support the new trigger types with Firebird.

 

I fixed/worked around a bug in Firebird that has to do with a bogus error when extracting metadata from a database.  Seems the internal buffers get messed up after the first use of the SQLDA/SQLVAR buffers of the query to retreive the constraints information from the system tables.  Simply unpreparing the cursor to get this data each time avoids the error.  It doesn't run as fast, but at least it runs.

 

I fixed the parser in a few places that will make filters be parsed correctly when using a negative number and I also fixed the parsing of the IsSQLAggregate() method so that it will take this into proper consideration.  

 

 

1/13/2007 Sub-Release 4.7 Beta 14

 

I fixed two bugs that had to do with handling the relation alias name parsing for derived tables and select procedures.

 

I fixed a bug that wasn't parsing table names with double quotes properly that was introduced in a previous beta release.

 

I added Hans code to allow the TIBOQuery to look at the where clause and find column relationships between master and detail datasets that don't have the same name but are associated in the where clause and so when inserting a record in the detail dataset it would get the associated value from the master dataset.

 

I discovered a couple of bugs that I am still working on.  It is in the Company sample application.  Somehow the mixture of MasterLinks and KeyLinks relationships is causing the detail dataset of the MasterLinks relationship to go into edit state when the master dataset scrolls a record.  It should not go into edit state, but rather refresh the detail dataset.

 

1/07/2007 Sub-Release 4.7 Beta 13

 

(Happy New Year!)

 

All bugs fixed in this sub-release were a result of new bugs introduced during the beta period.

 

I included Hans code to show the caret position of the memo controls on the status bar in the component editor forms.  This will also affect the IB_SQL tool too.

 

I fixed a parsing bug that caused the SET TERM in scripts to fail.

 

I fixed the IB_JPEGImage control so that it will work in the control grid TIB_CtrlGrid.

 

I published the OnContextPopup event for Delphi 5 and up.

 

I fixed a problem with the handling of Inserts when an exception was raised when posting and internal flag was set incorrectly in some cases and it would not allow a new data value to be entered and post attempted again. 

 

I fixed the SQL generated by the TIB_LocateCursor if a locate is performed on the server for the case when a column alias is used and it happens to also be a column in the KeyLinks.

 

12/21/2006 Sub-Release 4.7 Beta 12

 

I fixed the TIB_Export component to properly clear out previous field names in the DBF file header buffers.  What was happening is field names from a previous use were being superimposed in the whitespace of subsequent, shorter, field names.

 

I included a fix Geoff Worboys provided for the embedding of controls in the IB_Grid more effectively.

 

I implemented the new Firebird fb_interpret() export in order to avoid potential buffer overruns.

 

I fixed the TIB_JpegImage control so that it can be used on the TIB_CtrlGrid control.

 

I publised the OnContextPopup event for the visual controls.

 

I fixed the reporting of errors with the EIBO_ISCError exception object.  I also added an indicator that the error message has been truncated with a (...) notation at the end.  To get all the information from the exception object you have to examine all the other properties of it or just call the ShowDialog method.

 

I fixed the use of IBO with dataset providers for using TClientDatasets with IBO.  There were a couple of problems when using dataset fields (kind of like master-detail) and updates.

 

I fixed the disorganized use of TabOrder in the controls on the TIB_SearchPanel.

 

I found and fixed a spot in the code that was not allowing the default value of 3 for SQLDialect to be apparent in all circumstances.

 

I fixed a problem with using a column alias on a column that is part of the KeyLinks columns when the Locate() method is called and an internal query needs to be constructed the alias name caused this to fail.  I have now made it so that you can use alias names with columns in the KeyLinks and IBO will figure it all out automatically.

 

I included support so that IBO will recognize and not choke when using a query against a derived table (new feature in Firebird 2.0).

 

I fixed some parsing errors having to do with round parenthesis when not skipping them.

 

I made it so that when using the browse form in IB_SQL that you can copy values from a row to the clipboard and then you can edit those value entries, and even get rid of some of them, and then apply those values from out of the clipboard back to the row.  I made the primary key columns appear dark green/olive and I made it so that foreign keys (straight forward ones) can be clicked on via a hyperlink and a popup window will appear with all the values from the record it references.  The value NULL is indicated in a softer color so it is easier to distinguish it as NULL instead of a text value.

 

I added support for the STARTS and STARTS WITH clause in the filter string.

 

I added some more properties to the TIB_Query component editor on the tab where it is dealing with updates.

 

12/02/2006 Sub-Release 4.7 Beta 11

 

I enhanced the performance of acquiring various values for the TIB_Column objects.  In order to know if it is participating in a primary key, foreign key, etc. each time the property was read there was a string-based lookup performed in the schema cache.  Now, the value is only looked up once and cached.  This was because of using this information in the cell coloring of the grid in the IBF_Browse form that is used in the IB_SQL tool and the utility bar as well as the component editors.

 

I made various improvements to the browse tool in IB_SQL.  It is now possible to see foreign keys (single column only) hyperlinked in the grid so that when clicked on you get a popup query window showing the entire record of the table the foreign key references.  I also enahnced the coloring a little bit to improve the readability.  (NULL) text has been softened to silver and primary key column are in olive.

 

I failed to take into consideration the CASE ... END statement when parsing statements in scripts.  It now handles them properly.

 

I fixed a bug in the TIB_StatementGrid that prevented new parameter values assigned directly to an input parameter to become shown in the grid.  This caused values assigned to the parameter directly to be overwritten by the non-updated value in the grid. 

 

I added some additional properties to the IBF_Query form that is used in IB_SQL and as a component editor.  DML Caching flags and a couple others to do with SearchedDeletes, SearchedEdits, etc.

 

I fixed some issues having to do with provider support for the TDataset based query.  I wasn't handling updates accurately because the values were being sent in a parameters object where all the TParam instances were of ParamType of ptUnknown.  I had to set them to ptInput and I had to give them their appropriate names.  Now updates are handled correctly via provider support in IBO.  There was also a problem with how the literal was being sent.  It was quoting identifiers with single quotes which is totally wrong.  I made it so that it would quote identifiers with a double quote only for dialect 3 and higher.

 

 

11/28/2006 Sub-Release 4.7 Beta 9 & 10

 

I cleaned up the problems with building the C++ Builder version for BDS 4.0 (Delphi 2006).  There was a problem with the compiler directives because with this version of Delphi the packages are built for both at the same time.  In order to make everything work I had to remove a feature that C++ Builder did not like.  It wasn't a big deal.  I was trying to use properties that were indexed by an enumerated type.  I simply changed to an integer and made constants for each enumerated value.  There were no published or streamed properties involved so there will be no impact to existing applications.  This also led to the cleanup of the compiler directives in general.  I removed the IBO4_BETA stuff because it was only for the purpose of moving from IBO 3.6 to IBO 4.6.

 

I have modified the FullFieldName property of TIB_Column in its behavior.  It used to include the SQLName if there was a RelName value for the column.  However, with the addition of the concept of relation aliases and encorporating them into how columns are referenced I realized I have two different ways to reference a fully qualified field.  Thus, I have divided it into two separate properties.  FullFieldName and FullSQLName.  FullFieldName will contain the relation alias and the column alias whereas the FullSQLName will contain the actual relation name and the actual column name.  In most cases these are the same, but this is how I have chosen to separate the logic.  Also, when doing value binding with the stringlist based properties, priority will first be given to matches on the relation alias and column alias, if there is no match there then it will attempt to match on the actual relation name and column name of the underlying table.  I realize this could be problematic and lead to potential bleeding of values between multiple columns, but with care all these problems can be avoided by providing specific values for everything that has an alias.

 

While I've been deep into the parsing routines, I've started laying the groudwork to deal with UNION statements better. 

 

I fixed a bug where the relation alias is not being used properly when KeyLinks are autodefined.  If there is a relation alias in use then this should be used in the KeyLinks, MasterLinks, etc. properties as well.

 

I fixed a bug in the logic surrounding posting records.  It was possible for an exception to take place after the record had been successfully submitted to the server, which made IBO think that nothing had posted.  The case that I discovered simply was to do with the BufferSyncFlags having an exception raised when it was refreshing the buffer after the post.  In the case of an exception here, the fact that the record was inserted should be reflected by going to browse state.  It will now go to the proper state and still raise whatever exception happened.

 

I included some additional properties in the TIB_Query editor on the UpdateSQL tab.  I also added the ability to manipulate the stringlist based properties at the TIB_Connection level.

 

I included the fix so that the TIB_Grid will respond to the context sensitive help coming from clicking the question mark on the upper right of the form and then clicking on the grid.

 

 

11/24/2006 Sub-Release 4.7 Beta 8

 

I updated the various button bar controls so that when using custom glyphs it will figure out the num of glyphs based on the ration of its height compared to the width.  It will set it to either 1 or 2 automatically.  Thus, people can provide one or two glyphs depending on the size of the single image associated to the button.

 

 

I added a new column type for TIBODataset called TIBOLargeInt.  The reason I did this was to override its SetVariant() setter method so that instead of raising an exception it would go ahead and actually store the value.  Just because variants don't have a native 64 bit integer, doesn't mean they cannot carry information that can properly be translated to a 64 bit integer value.

 

 

I put in a fix to compensate for TParams.ParseSQL deficiency to handle a statement with special characters in it.  For some reason, it failed to add a TParam when it should have.  I check for a missing parameter and put it in so that we avoid a missing parameter error later on.

 

 

I added the file types for InterBase 7 (*.ib) and Firebird SQL (*.fdb) to the IB_SQL tool's open file filter dialog.

 

 

I created a new design-time propery editor for the TIB_LookupCombo.DisplayField property.  I did this so that it would not include the relation alias name or the relation name.  In the future I will finish it such that it will only display the columns that are participating in the KeyLinks or KeyDescLinks relationship.

 

 

I merged in the donated enhancement to the TIB_Export component to SkipHiddenFields.

 

I completed some fairly extensive revisions to my parsing routines and while I was at it I made it possible to execute scripts in the TIB_Script component without having to use the SET TERM mechanism to avoid parsing errors when using a semicolon as a statement terminator and having semicolons in the stored procedure and trigger language.

 

 

I added to the TIB_Database component the ExecSQL() method which will allow a statement to be directly executed against the database using its current default transaction.  The transaction will be activated as a result of this call since it is assumed it will be to effect some kind of change on the server.

 

 

I made some fairly involved revisions to the handling of cached updates in conjunction with using master-detail relationships.  There are cases where it is possible to end up with orphaned cached updates and I am now making it so that orphaned cached updates will be silently purged from the buffers.  I also do what I can to proactively avoid creating orphaned cached updates.  For example, if you are inserting a master record and also inserting detail records, if you change the value of a linking column in the master record it will propagate that change to all the inserted records in the detail dataset.

 

 

I revised a spot in my code where I roll over a counter by catching an exception with an exception handler.  I recall receiving feedback that this is problematic for some people's debugging efforts to have exceptions raised even if they are handled.  I simply changed the logic to that it will not need any exception handling.

 

 

I added code that will keep the events assigned to the TIB_Column instances consistent between the Fields columns and the BufferFields columns.  Also, when assigning values between TIB_Column instances it will compensate for the OnGetText and OnSetText alterations such that the value passed will be resolved to its value for storage purposes rather than for display purposes.  Thus, it isn't advisable to use the OnGetText and OnSetText logic as a means of trying to manipulate values in order to establish a data relationship.  This change has the potential of affecting existing applications that use these events.

 

 

I was getting some very strange behaviors in the KeyLinks lookup relationship when I discovered that somehow I had stale pointers in a list of column object references used for optimized column referencing.  I discovered and fixed that was not fully invalidating all of my pointers in the place designed for that purpose.  This was a result of changing some other unrelated things around such that that this problem now became evident.  It was possible that the pointers were being properly maintained prior to these inadvertant results because the resulting problem was very easy to see.

 

 

11/23/2006 Sub-Release 4.7 Beta 5, 6 & 7

 

I changed the logic of how a request to return a record count is handled.  The first thing I did was allow it to fire the event OnGetRecordCount if it is assigned.  Before I would only call the event if the buffers were not already fully populated with the records from the server.  Also, if the query was an aggregate or some other complicated query that I cannot figure out by simply fetching all rows I will now raise an exception that the record count cannot be obtained.  This will happen if you are in search mode and you request the record count of a query that is too difficult or impossible to parse together a statement to get that count from the server.  NOTE: With the advent of the EXECUTE BLOCK statement capabilities, I will in the near future allow the record count to be obtained by placing the query inside of it and executing it and then having it count the resulting records and return that.  Keep in mind, this is a very poor client server mechanism and it should only be used sparingly.  Still, even though inefficient, it's nice to have the functionality there when we need it.

 

 

I improved the logic of dealing with column types such that assumptions won't be made based on the SQLScale value.  There was confusion between numeric types and blob types because blobs are starting to make use of the storage in SQLScale for its own purposes.

 

 

I fixed the dialog where exceptions are displayed so that it will properly get the line and column information and show the cursor in the proper position where the error is at.

 

 

I made it so that the row state of the TIB_Row that handle input parameters will keep the row state either rsUnmodified or rsModified.  There were some problems when it would remain set at rsNone and there is no need for the row state of rsNone to be used when working with input parameters.

 

I also made it so that text trimming rules will be applied to parameters.

 

 

I fixed the TIB_Grid so that the values of an insert being processed will not be lost in a rare case where if the up arrow is pressed it will revert the values in the row buffer to null or blank.

 

 

I fixed some additional points where information was being put into the schema cache and other string settings that expected them to have special characters escaped but they were not being escaped and thus when this information was interpreted it was getting garbled if there was a # in any of the field names.

 

 

I significantly revised the TIB_StatementGrid control so that column widths are maintained according to the widths of the data being stored.  I also revised the display of the column information to always show the class name and to always show the SQL definition of the column's datatype.  It will also show the domain name if requested, surrounded by square brackets.

 

 

11/22/2006 Sub-Release 4.7 Beta 2, 3 & 4

 

I went through all the sample apps and updated them according to the needed changes below where the relation alias naming is concerned.  They are all able to be used again without errors.

 

 

I noticed that Firebird 2.x does not allow a database handle to be shared from the BDE with IBO.  I tried to use the Events sample app which uses this feature and it failed.  I also had to fix the TestScan application as well.

 

 

I significantly improved the Survey sample application.  There is a lot less code to do the same and more of what it was doing before.  This is a good example of how to use drag and drop with TIB_Grid and how to do some fairly tricky data manipulations to manually set the order of records.  It is also an excellent demonstration of the automatic synchronization of buffers between datasets as changes are made.

 

 

I fixed numerous aspects having to do with using the relation alias name in the SQL parsed together and sent to the server.  IBO puts together many SQL statements on your behalf that need to know the relaion alias name in order to produce statements that properly reflect what the server will accept.  This had to do with establishing that the KeyRelation property will actually store the relaion alias name if one is being used.  I had a number of places to touch up as a result of this.  One of them in particular had to do with figuring out how to transfer the RelAliasName value to the other column objects.  Normally all the basic column information is stored in the XSQLVAR structure and I would just read it out of the buffers and transfer it by copying the buffers.  However, there isn't a place in the buffers for the relation alias so I had to figure out an alternative method.  This was particularly difficut for the KeyFields columns.  Things like whether a column can be updated or if it is how it is posted to the server, whether a column can be searched against, etc. were being affected by this.

 

 

I fixed a bug in the logic that maintains a stringlist of the actual text (minus comments) used in the select list of a query so that I can parse together statements that rely on knowing what SQL went into the creation of an output column in a statement.  This information is stored with various controls characters escaped.  There are multiple places where this string list is modified and in the past I made the assumption I could add straight field names to it since they wouldn't have characters in them that would need to be escaped.  However, since the addition of quoted identifiers I needed to go ahead and escape everything that goes into this stringlist so that when it is read from the information comes back correctly.  There was only a problem if you were using the '#' character in your field names.

 

 

I added an OnMultiSelect event notification of the ToggleSelected method of TIB_BDataset (TIB_Query) is called.

 

 

I improved the internal handling of the GetSeekCursor so that a more technically correct understanding of an error will be returned in case of an exception.  It was giving an invalid statement handle error before but it wasn't known what the problem that caused it was.  Now it will return the exception of what was causing the statement handle to be invalid.

 

 

I put in a fix for function TIBODataset.GetIndexField( Index: integer ): TField; such that it will use the TIB_Column.BDEFieldName instead of TIB_Column.FieldName when doing a TDataset.FindField() call since the fields were created based on what the BDEFieldName returned. 

 

 

I fixed TIBODataset handling of parameter values when using the AssignWithSQLSearch() method.  It was losing the parameter values in the transfer such that the new query would not draw any records due to no input parameter values being transferred.

 

 

I fixed the problem where blank exception messages were being returned in some situations.

 

 

11/16/2006 Sub-Release 4.7 Beta 1

 

All properties that store snippets of text that may end up being parsed into a SELECT statement sent to the server should use the relation alias name instead of the relation name if a relation alias is being used.  This includes the KeyLinks, MasterLinks, JoinLinks, GeneratorLinks, MasterParamLinks, etc. properties.  While some things may still work when leaving the relation name in when using a relation alias name, it is advisable to change to use the alias name.  It is very likely that existing applications may need to check these settings and update them to reflect the relation alias setting or else they will have exceptions raised.

 

 

I fixed a bug in function TIB_Column.GetAsExtended: extended; so that it would handle INT_64 numeric type natively.

 

 

I enhanced function TIB_Row.GetByName( AFieldName: string; var AIB_Field: TIB_Column ): boolean; so that it would work with the RelAliasName better.

 

 

I change the SQLDialect property to default to 3 instead of 1.  This may affect apps as this value was not stored in the DFM if it was 1 but upon upgrading it will become 3 because of the new default.  This probably won't affect much since as soon as you connect to a database the SQLDialect changes to reflect whatever dialact the database actually is.  This change of default value should only affect situations where you are creating a new database and you have not explicitly set the dialect to what you want.  I have made it so that the value will always be stored in the DFM so that I can change the default value again without causing an unexpected change of value in the future.

 

 

I added the following to the TIB_ConnectCharacteristics record:

 

  dbPlatform: string;

  dbBuildType: string;

  dbBuildInfo: string;

  dbServer_Major_Version:integer;

  dbServer_Minor_Version:integer;

  dbServer_Release:integer;

  dbServer_Build:integer;

 

 

I fixed a bug in the TIBOBaseTable.CreateTable; method.  It was not properly distinguishing between MEMO and BINARY blob types.  It still doesn't allow for specifying other blob sub types other than 1 for text and 0 for binary.

 

 

I fixed a bug in function TIBODataset.GetIndexField( Index: integer ): TField; and function TIBODataset.GetIsIndexField(Field: TField): Boolean; methods so that it will better handle the relation name or relation alias name in the ORDER BY clause.

 

 

The statement parser has been enhaced to handle situations where there are two separate words that define a single token.  For example, the ORDER BY clause, the FOR UPDATE clause, GROUP BY, etc.  This became necessary in order to distinguish the use of the FOR token.  The new language feature allowing access to a generator by calling FOR NEXT VALUE needs to be distinguished from the FOR UPDATE clause. 

 

I added a procedure to my parsing library that will take an SQL statement and populate a supplied TStrings object with a list of the relation names in the query with their alias name. 

The list will have entries as follows: [RELATION ALIAS NAME]=[RELATION NAME].

If there is no alias then it will return entries as follows: [RELATION NAME]=[RELATION NAME]

 

      procedure GetRelAliasList( const SQL: string; RelAliasList: TStrings );

 

 

Included the isc_info_sql_relation_alias = 25; piece of data in the IB_Header.pas file so that this information can be received from the server.  IBO will now call the server (Firebird 2.x only) to have the relation alias information returned in the TIB_Column instances.  Otherwise, IBO will rely on the parsing of the statement and associating the relation alias with the relation name.  Thus, for the time being, it is possi