New Features and Bug Fixes in Version 4.5 of ODBCExpress
========================================================
New Features
------------
New features introduced since ODBCExpress 4.01:
1. The full ODBC 3.0 API is implemented. This makes new functionality possible
such as the following:
- Connection pooling, which speeds up your average connection time and
reduces the number of physical database connections used.
- Variable-length bookmarks to support the full range of bookmark
implementations.
2. The TOEDataSet is extended to implement most of the functionality exposed by
the virtual TDataSet:
- The Locate and Lookup methods now support multiple fields, as well as the
option to do prefix or sub-string partial matching with the Locate.
- Calculated fields and Lookup fields are implemented. The values for
Calculated fields are provided via the OnCalcFields event.
- Pure cursor-based Absolute and Relative fetching can now be done with the
TOEDataSet, which is not possible using the standard MoveBy method.
- A LocateInsert property is added as a solution for the "disappearing
inserts" problem with the TOEDataSet. It makes use of the target primary
key values to close and re-open the dataset and then position to the
inserted row (if it matches the search criteria of the new result set).
- A Detect button is added to the Target property editor to allow you to
automatically determine the target table, if possible.
3. The non-visual controls has the following new functionality:
- The TOEAdministrator now distinguishes between user and system
DataSources, allowing you to retrieve only the user or system DataSources,
or both. This functionality is also implemented for the TDSComboBox and
TDSListBox DataSource listing controls.
- The TOECatalog can now return Index and ForeignKey information for the
tables retrieved by the component.
- A Write-to-File button is added in the TOESchema property editor to allow
you view the actual script generated by the TOESchema component at any
time.
4. The following additional functionality is added to the handle components:
- The OnConnect and OnDisconnect events are added to the THdbc connection
component, which fires after a connection is made and released
respectively.
- A MaxRows property is added which allows you to limit the number of rows
in a result set (if of course this is supported by the database).
- Also, full support for spaces in table and column names are provided by
all components (specifically by the SQL Builder, the SQL Generation
Levels, the TOEDataSet and the TOESchema).
New features introduced since ODBCExpress 4.5 Beta:
1. The following additional functionality is added to the TOEDataSet:
- A DataSource property (which must not be confused with the
THdbc.DataSource property) is added to the TOEDataSet to allow the easy
creation of master-detail relationships between TOEDataSet components.
- An ExecAsync property is added to the THstmt and TOEDataSet components to
allow cancelable queries with these two components. The AbortQuery method
of each of these two components can be then be used to cancel the
execution of queries.
2. The following additional functionality is added to the handle components:
- A RaiseSoftErrors property (which can be accessed as
GlobalHenv.Error.RaiseSoftErrors) is added to the TODBCError error class
to allow control over whether soft ODBC errors must be raised as EODBC
exceptions or not. By default no soft ODBC errors are raised as
exceptions.
- A global ThreadedHenv boolean variable was added which when set to True
will allow multiple GlobalHenv components to be automatically distributed
across threads. This is to allow extended functionality such as providing
a separate connection pool for each new thread. Be default a single
GlobalHenv component is used across multiple threads (since ODBC is
thread-safe at environment level for all ODBC drivers).
Bug Fixes
---------
The following bugs, which existed in ODBCExpress 4.01, are now fixed in
ODBCExpress 4.5:
1. The following problems with the TOEDataSet are fixed:
- A refresh problem in which the last deleted row was not cleared from the
visual data-aware controls.
- Inserting a row into an empty result set caused an "invalid bookmark"
error.
- A problem with retrieving the table names and column names with some ODBC
drivers which caused the Table and Target property editors to be empty, as
well as caused the SQL Builder to not have this information available.
- A bug in the virtual TDataSet which caused the OnValidate event not to
fire.
- An ignored soft error raised by some ODBC drivers when fetching the last
row in a result set caused TOEDataSet.EOF to be False instead of True.
- Problems using the Locate method with integers and reals, as well as with
the Lookup method in which it incorrectly repositioned the cursor after
the lookup was done.
- A target Clear method was added since there was no way to clear the
Primary and Ignore columns. Also two other methods PrimaryColsCore and
IgnoreColsCore were added to provide for specifying the number of items in
dynamically built Primary and Ignore columns string arrays.
- Some runtime cases where the dataset wasn't closed, e.g. when re-setting
the SQL property or disconnecting from the DataSource.
- A problem in which parameters where incorrectly re-created during
component loading, causing parameter values set up at design-time to be
lost.
- Some parameter value formatting problems with the parameters property
editor.
- The GetFieldData and SetFieldData methods incorrecly moved more than
DataSize bytes only.
- Problems with ftBytes not being fully handled, as well as with ftDate and
ftTime fields which were not correctly converted during posting.
2. The following problems with the visual and non-visual controls are fixed:
- Deferred nested component creation in the TExtendedGrid is done to avoid
creating non-used components not supported by a specific operating system.
- Terminate methods were added to TOESchema and TOECatalog to allow you to
close the cursor of result sets used within the components if necessary.
This is to avoid "cursor open" errors with some ODBC drivers.
3. The following problems with the handle components are fixed:
- When the Connected property of the THdbc is True and the connection fails
during component loading, it prevented the form or data module to complete
the loading process.
- The transaction IsolationLevel of the THdbc wasn't set at connection
time.
- Problems with the RowCount property is fixed and the implementation of
this property is extended to take advantage of faster ways where possible
to determine the number of rows in the result set.
- The MaxNullString constant was changed from 254 to make a more acceptable
255 characters together with a null-termination character available for
the parameters and columns.
The following bugs, which existed in ODBCExpress 4.5 Beta, are now fixed in
ODBCExpress 4.5:
1. The following problems with the TOEDataSet are fixed:
- The TField.OldValue property did not return the old value of a field after
the field was edited.
- Adding fields with the TOEDataSet "Add Fields" property editor while the
dataset is active caused an access violation.
- Selecting multiple rows in the TDBGrid causes rows in the grid to
alternate between being highlighted and not higlighted. This is due to an
invalid binary search done on bookmarks (which cannot be assumed to be
sorted) in the TDBGrid. A work-around will now work with all
bookmark-sorted result sets (which is the case for most bookmarked result
sets).
2. The following problems with the handle components are fixed:
- A problem in which the default value of the ConnectionPooling property was
changed during form loading to the current value of the corresponding
GlobalHenv component.
- The THdbc.GetInfoString function did not return the full string value for
any given InfoType parameter.
- A couple of extended ODBC constants were left out of the OCIH constants
unit.
Comments
--------
Some important comments on the new version:
1. We recommend using the Microsoft Data Access Components (MDAC) 1.5c or later
with this version of ODBCExpress.
2. When installing MDAC 1.5c on Windows 95 machines, you might have to install
Internet Explorer 4.0 as well. This is to obtain some required DLLs not
distributed with MDAC 1.5c for Windows 95.
3. The code were restructured and optimized to provide a complete division
between the following 3 levels of code: non-visual code, visual code and
design-time code. Also the property-editor code and registration code are
now in two separate units, allowing us to distribute the registration unit
source to allow for user customization.
4. The ODBC-Delphi Interface (ODI) unit layer was removed to avoid any
limitations placed on wrapped ODBC functions.
5. The ODBC Call-Level Interface Header for MS SQL Server (OCIHSS) unit was
removed since the constants contained in this unit are also contained by the
ODBC Call-Level Interface Header (OCIH) unit.
6. The TOEListBox and TOEGrid won't be supported any more, since we feel that
custom controls doesn't form part of our focus anymore. The source code for
these component are provided for those users still wanting to use these
components with ODBCExpress.
7. All Hint and Warning messages which cannot be avoided has been hidden in
this version.
Acknowledgements
----------------
Thanks to everybody for all the suggestions and feedback which were instrumental
in the development of this new version of ODBCExpress. A special thanks to
Stephen Doucet, Ove Ranheim, Rainer Wantosch and all the other ODBCExpress users
who provided us with detailed source code on new features and bug fixes.