New Features and Bug Fixes in Version 6.0 of ODBCExpress
========================================================
New Features
------------
New features introduced since the previous version:
1. Multiple fields with the same name in a SQL statement are now supported for
both the THstmt and TOEDataSet/TOEQuery components. The implementation has
the same behaviour as the TQuery component.
2. Multiple parameters with the same name in a SQL statement are now supported
for both the THstmt and TOEDataSet/TOEQuery components. The implementation
has the same behaviour as the TQuery component.
3. Support is added for WideString and Guid columns and parameters on the
THstmt, and WideString and Guid fields on the TOEDataSet/TOEQuery
components. WideString and Guid support is also added to the TOESchema.
4. Decimal and numeric column support have been added to the TOESchema, as well
as the THstmt and TOEDataSet/TOEQuery components. Specifically the
TOESchema now allows you to specify the scale (number of decimal digits) of
such a column. Also decimal and numeric types are converted to basic
integer types in the THstmt and TOEDataSet/TOEQuery components when the
scale is zero.
5. The GetIndexNames method and IndexDefs property are now implemented for the
TOEDataSet/TOEQuery components.
6. Full provider support is added with all relevant IProviderSupport methods
implemented for the TOEDataSet/TOEQuery components.
TClientDataSet.ApplyUpdates now works correctly as well.
7. Functionality has been added to sort the front-end cache of the
TOEDataSet/TOEQuery components. Two overloaded "SortCache" methods allow
you to sort the cache in an ascending or descending order on a specified
field in the dataset.
8. Public return code properties called RetCode have been added to the THenv,
THdbc and THstmt components. These properties will be set each time to the
return code of the main ODBC function call made as a result of a method call
on each of these components.
9. The TOECatalog functionality has been integrated into the TOESchema
component to allow you to populate a TOESchema from an existing database
schema. View objects are now part of table objects.
TableByName/ProcedureByName methods and TableNames/ProcedureNames properties
have also been added. An option to ignore errors is now included at all
levels of load, drop and scripting functionality.
10. Load and drop events have been added to the TOESchema, that provides you
with the opportunity to modify the generated load and drop SQL.
11. Better key-detection functionality has been added to the
TOECatalog/TOESchema components.
12. OnChange and OnResize events have been added to the TExtendedGrid.
13. The TDSComboBox and TDSListBox components now auto-populates, instead of
having to call a method to populate it. The Populate methods on these
components are therefore replaced with Refresh methods instead.
14. Run-time and design-time packages have been created that allows you to
distribute the run-time package of ODBCExpress with your application, if
needed.
15. Many performance improvements have been made on retrieval and positional
insert, update and delete operations, as well as many code optimisations for
more efficient code.
16. And last but not least, many new tools have been added that will assist you
with the development of your database application. The tools are installed
under the "ODBCExpress" menu in the IDE. They include tools to:
- generate and insert SQL statements directly into your source code
- execute SQL statements against any database and manipulate data visually
- manipulate database schemas
- generate and run SQL and data scripts
Bug Fixes
---------
Bug fixes included since the previous version:
THstmt and TOEDataSet/TOEQuery:
1. Accessing the RecordCount property failed when the rcFunction RowCountMethod
was not supported. Instead of relying on the user to select an appropriate
RowCountMethod, it will now detect if rcFunction is supported or not and
skip to the next method of determining the row count if necessary.
2. The string-trimming functionality sometimes added garbage to the end of
strings when they were inserted at the database.
TOEDataSet/TOEQuery:
3. Assigning a null character (#0) to a parameter in a dataset inserted a #0
instead of an empty string in the database. Any number of concatenated #0's
will now be inserted as an empty string, as is the behaviour of the TQuery
component.
4. The FieldDefs.Updated property returned False after a dataset was opened,
and caused any subsequent call to FieldDefs.Update to fail.
FieldDefs.Updated is now set appropriately when a dataset is opened.
5. Parameter values were lost when the SQL property was modified. Parameter
values are now kept between any queries, where appropriate.
6. A variable-byte column was incorrectly returned as a fixed-byte field. A
variable-byte column is now correctly returned as a ftVarBytes field, and a
variant of the correct size containing the bytes is also returned.
7. An access violation occurred when a string longer than 255 characters was
assigned to a parameter when using a core-level ODBC driver. Memory for a
string parameter in core-level ODBC drivers will now automatically be
re-allocated and the parameter will be re-bound as needed. You can also
optionally override the default maximum parameter length in a core-level
ODBC driver by setting the TParam.Size property before assigning any
parameter values.
8. When the dataset was cached and the RecNo property was accessed, it caused
duplicate rows in multi-row controls like the TDBGrid. This is now fixed by
saving and restoring the cache cursor at the beginning and end respectively
of the GetRecNo method.
9. You could not positionally null a blob field in the dataset when the field
contained data. This was only a visual problem and is now fixed.
10. The TField.FixedChar property always returned False. It now returns True if
the field is a fixed-length string field.
11. When filtering was enabled, the Locate and Lookup methods failed.
12. Changing certain properties like Cached inconsistently changed other
property values like CursorType on the component. Changing any property on
the component that automatically changes other property values will now do
so in a consistent manner.
13. A possible memory leak existed when using the NextResultSet functionality.
This problem also caused an access violation under some circumstances.
14. A SQL statement was prepared when an attempt was made to execute it
asynchronously. Now a SQL statement will not be prepared when executing it
asynchronously. This allows for better asynchronous execution.
THstmt:
15. The cursor positions of memory streams returned by the ColMemory and
CellMemory properties were now automatically set to zero.
16. An exception was not raised when an attempt was made to execute a statement
asynchronously and asynchronous execution was not supported by the ODBC
driver.
THdbc:
17. The quote character used for identifiers (owner, table, stored procedure and
column names) was not database specific. Now a database-specific quote
character (as returned by the THdbc.QuoteChar property) is used throughout
the code.
18. The table or stored procedure owner was not always taken in consideration
where use of a table or stored procedure name was being made. Now it is
implemented throughout the code. Also the TableName and ProcedureName
properties of the TOEDataSet/TOEQuery components are prefixed with owners,
if any, and the TableNames and ProcedureNames properties of the
TOECatalog/TOESchema components are prefixed with owners, if any. Provision
is also made for databases that does not have an owner (schema) concept.
EncodeIdentifier and DecodeIdentifier methods have been added to THdbc to
encode and decode database-specific identifiers respectively.
TOESchema:
19. The load and drop SQL statements were generated in the wrong order when a
script was generated. The drop SQL statements are now placed before the
load SQL statements in the script.
20. An index defined as a descending index was incorrectly created as an
ascending index in the database.
21. Colon characters where incorrectly parsed as parameters when executing a
script. This has now been disabled.
TOECatalog:
22. The ascending or descending attribute of an index was not detected during
index retrieval.
TExtendedGrid:
23. The embedded edit control's OnChange event sometimes fired too late. The
edit change detection code has been re-written to fix this.
TODBCError:
24. The error dialog's bitmap did not have a transparent background colour.
General 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. The TOESetup component is removed since it is no longer needed. If anyone
disagrees, then please let us know.
3. The default value of the StringTrimming properties is changed to stTrimNone.
This is for performance and consistency reasons.
4. The DataSource, Table and StoredProc properties' drop-downs are now sorted
alphabetically in the Object Inspector.
5. It is not necessary for blob fields to be at the end of a SQL statement's
column list, or in the same order as they are defined in the database. This
if only necessary for some ODBC drivers when using a forward-only, read-only
cursor, as such a cursor typically cannot traverse backwards in the result
set, or even backwards in the current row of the result set.
6. The EODBC exception has been added to the "Exceptions Types to Ignore" list,
as this exception is always raised from the same position in the ODBCExpress
source code.
7. It has been verified that this version of ODBCExpress works fine in a CLX
environment.
8. The look and feel of all the property-editor dialogs has been improved, and
some new component editor shortcuts have been added.
9. The help file has been improved and topics now integrate with existing help
files.
Database Comments
-----------------
Some important database-specific comments:
1. Blob and Clob columns work fine with the latest Oracle ODBC drivers
available. Unfortunately we could not test the Microsoft Oracle ODBC driver
since it does not support Oracle 9. We found that the latest ODBC drivers
available from Oracle are very good.
2. For some reason positional nulling of blob fields using ODBC function calls
does not work with the Microsoft SQL Server ODBC driver. You will have to
use an alternative level of positional operations. Otherwise the Microsoft
SQL Server ODBC driver is very good.
3. We have also tested ODBCExpress with other main-stream databases available.
4. Non main-stream databases that we have tested recently and found to have
very good ODBC drivers are SQL Anywhere, MySQL, Caché and Teradata. Get the
latest version of the ODBC drivers from their web sites.
5. For the MySQL ODBC driver a work-around has been implemented in ODBCExpress
to allow it to work with a front-end cache in the TOEDataSet/TOEQuery
components, since using it without the cache is not an option as the ODBC
driver does not support bookmarks.
Acknowledgements
----------------
Thanks to everybody for all the suggestions and feedback which were instrumental
in the development of this new version of ODBCExpress. This includes the people
at Teradata, Udo Mayer and Glenn Crouch.