New Features and Bug Fixes in Version 5.06 of ODBCExpress
=========================================================
New Features
------------
New features introduced since the previous version:
1. You can now switch off parsing of a SQL statement for parameters by setting
the THstmt.SQLParsing or TCustomOEDataSet.Hstmt.SQLParsing properties to
False (default True). This is useful for when you concatenate data to your
SQL statement and want to prevent the parser from parsing colons as named
parameters. Of course setting the SQLParsing property to False means you
cannot reference a parameter by name anymore, but only by number.
published
property SQLParsing: Boolean read/write;
2. A new property THstmt.BulkData will when set to True (default False) cause
string columns to be retrieved as standard 256 byte length strings, which
can then be directly bound to another THstmt as bulk parameters. E.g.
//if BulkData is set to True on HstmtSelect
//then # may indicate a string parameter and column
HstmtInsert.BindParams(#, HstmtSelect.ColType[#],
HstmtSelect.ColValue[#],
HstmtSelect.RowSetSize);
Setting this property to True will also allow you to bind null values for
blob data in bulk, since normally you are not allowed to bind blob columns
in bulk under any circumstance. E.g.
//if BulkData is set to True on HstmtInsert
//then # may indicate a string parameter and column
if HstmtSelect.BlobCol[#] then
HstmtInsert.BindNulls(#)
else
HstmtInsert.BindParams(#, ...);
public
property BulkData: Boolean read/write;
3. The TOESchema.Abort method is added to allow you to abort the loading or
dropping of schema information. Application messages will be processed
during these operations. The TOESchema.Aborted property can be used to
determine if an operation was aborted.
public
procedure Abort;
property Aborted: Boolean read;
4. The TOESchema.OnProgress event is added to track the progress when loading
or dropping schema information.
type
TStepEvent = procedure (Sender: TObject;
Info: String) of object;
protected
procedure DoProgress(Info: String); virtual;
published
property OnProgress: TStepEvent read/write;
5. The TOESchema property editor dialog has been re-designed with a
treeview/listview interface. As a result the forms OCLCol, OCLIndex and
OCLView have been removed.
6. A new component TOEBulkCopy has been added. This component will allow you
to easily copy data from one data source to another data source. See the
OECopy demo for how to use the component.
type
TBindEvent = procedure (Sender: TObject;
Table: String;
Hstmt: THstmt) of object;
protected
//calls the OnProgress event
procedure DoProgress(Info: String); virtual;
//calls the OnBindParams event
procedure DoBindParams(Table: String;
Hstmt: THstmt); virtual;
public
//used to copy data from the source database to the target database
procedure Execute;
//used to copy data by running the SQL script FileName
procedure RunScript(FileName: String);
//used to close the cursors of result sets used within the component
procedure Terminate;
//used to abort the copying of data
procedure Abort;
//returns the number of rows copied sofar from the source to the target
property RowsAffected: SQLINTEGER read;
//used to determine if the copying of data was aborted
property Aborted: Boolean read;
published
//the connection component which identifies the source to copy data from
property hDbcSource: THdbc read/write;
//the connection component which identifies the target to copy data to
property hDbcTarget: THdbc read/write;
//SQL statement which generates a result set, normally a select statement
property SQLSource: String read/write;
//SQL statement with insert parameters, normally an insert statement
property SQLTarget: String read/write;
//indicates the SQL statement separator used when running a SQL script
property ExecMarker: String read/write;
//the number of rows that must be copied at a time
property RowSetSize: SQLUINTEGER read/write;
//used to limit the number of rows to be copied
property MaxRows: SQLUINTEGER read/write;
//used to indicate how the copy process must be transactioned
property CommitCount: SQLUINTEGER read/write;
//tracks the progress when copying data
property OnProgress: TStepEvent read/write;
//used to limit the rows copied from the source database
property OnBindParams: TBindEvent read/write;
Bug Fixes
---------
Bug fixes included since the previous version:
1. A problem with the index retrieval functionality of the TOECatalog component
in which every second index retrieved was not added to the list of indexes
in the component.
2. Some file close statements in the TOESchema component were not protected by
try..finally statements.
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.