New Features and Bug Fixes in Version 5.01 of ODBCExpress
=========================================================
New Features
------------
New features introduced since the previous version:
1. Connection Resolution - If the connection to your database is broken, for
example by a communication link failure, you can now recover from this
situation without re-starting your application. To implement this the
TODBCError class (GlobalHenv.Error property) now has a property called
"Resolve" which is True by default. When a connection failure occurs, the
"Resolve" method of either the THdbc or THenv will be called (depending on
where the failure occurred) to place all the ODBCExpress components in the
correct, closed state. The new OnConnectionFailure event on the TODBCError
class will then be called, which you can then use to re-connect and re-open
your queries if you wish. If you set the TODBCError.Resolve property to
False, the OnConnectionFailure event will still be called, however no
connection resolution will be done beforehand. You can then manually call
the "Resolve" methods of either the THenv or THdbc classes if you wish to
recover from the connection failure.
When the ODBCExpress units are unloaded from memory, connection resolution
is automatically applied to avoid any possible exceptions which could
interfere with this process.
2. The SQL statements used during inserts, updates, deletes and refreshes with
level 3 SQL Generation are now pre-prepared for the THstmt component,
TCustomOEDataSet descendants and the TOEUpdateObject descendants. This will
drastically increase the speed of these operations when done in bulk.
3. The ability to control the way in which string trimming is done has been
added. By default the ODBCExpress components trims the trailing spaces and
control characters of string data retrieved from the database. The
StringTrimming property on the THstmt and TDataSetHstmt components now
allows you to skip string trimming, trim the leading, trim the trailing, or
trim both the leading and trailing spaces and control characters.
4. If you have the source code of ODBCExpress, the option is now provided to
dynamically load the ODBC DLLs instead of linking to them statically. By
default ODBCExpress makes use of static linking, however by defining the
compiler directive "ODBCDYN" in the "conditional defines" section of your
project options, you can re-compile the ODBCExpress code to dynamically link
to the ODBC DLLs instead.
The creation of the global THenv component is now also deferred to avoid
the ODBC DLLs being loaded before they are needed.
5. A new exception class, EODBCExpress, is added and is used to raise any
exception which occurs in the ODBCExpress code, instead of using the base
Exception class to do this. The EODBC exception class, which is used to
raise exceptions returned by ODBC, is now also inherited from the
EODBCExpress exception class.
6. The TOEParams class has been re-implemented to take advantage of the new
virtual TParams class in VCL 4. The TOEParams class is now derived from the
TParams class, and the TOEParam class is replaced by the TParam class. The
Params property editor has been replaced (and the OCLParam unit which
contained this property editor has been removed). The enumeration
TOEParamType has also been replaced by the enumeration TParamType. The new
TOEParams will automatically convert the old TOEParams property stream to
the new property stream. Since the TOEParam has been replaced by the
TParam, the additional DefRequired, DefDataType, DefPrecision and DefSize
properties of TOEParam have been added as array properties to TOEParams,
since it's not possible to extend TParam as used by TParams.
Bug Fixes
---------
Bug fixes included since the previous version:
1. The ObjExportAll compiler directive has been to all the units to allow you
to use the C++Builder package at run time.
2. A memory leak in the CellMemory and CellStream functionality of the THstmt
has been fixed.
3. The MaxRows property and the DISTINCT, HAVING and UNION clauses are taken
into consideration when determining the RowCount. However limiting the rows
in a result set via SQL commands will not be taken into consideration.
4. The BindString method used to set the ParamSize property to the length of
the string to provide for binding memo fields using this method. This fix
was only necessary for some ODBC drivers. However this causes some problems
when a statement is executed more than once and is therefore removed. If
you find that when you use BindString for memo fields and all the text is
not transferred to the database, set the ParamSize property to the size of
the memo before executing the statement.
5. The TBlobField.OldValue property will now always return the correct value.
It was not fully fixed in the previous release as was reported.
6. The default attributes DefRequired, DefDataType, DefPrecision and DefSize
was not set for stored procedure parameters.
7. You will now also be able to edit SQL and stored procedure parameters at
design time even if you are not connected to a database. In this situation
the correct SQL parameter types will not be detected, and the stored
procedure parameters will not be detected at all. Of course it will first
give you the option to connect before it allows you to edit the parameters.
8. In a master-detail relationship, you can now have detail parameters which
do not form part of the master field list.
9. Changing certain properties of the TOEDataSet parameters, the TOEUpdateSQL
and the TOEUpdateProc components caused some unnecessary re-preparing of the
SQL statement.
10. The output parameters of stored procedures used in the TOEUpdateProc
component are now correctly retrieved.
11. A bug in the Delphi TClientDataSet code causes the first row of every block
of rows fetched to the client to be duplicated when used together with a
TCustomOEDataSet descendant. A temporary Fix for has been implemented for
this problem, until the TClientDataSet code is corrected.
Comments
--------
Some important comments on the new version:
1. Please report any problems experienced with this new version to
support@odbcexpress.com so that it can be addressed as soon as possible.
2. Apply both the Delphi 4 Update Packs #2 and #3.
3. When installing ODBCExpress on certain Win95 and Win98 machines, you might
find that the ODBCExpress package does not want to load into memory. Make
sure you have MDAC 2 installed on the machine. If this is correctly
installed and the problem still persists, then just re-compile the
ODBCExpress package.
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
Daniel Easton for providing the code to dynamically link to the ODBC DLLs.