
ODBCExpress Demos
=================

    Project   Description
    -------   -----------

1.  OELoad    Load Tables and Data
2.  OEVisual  Delphi Data-Aware Controls
3.  OEUpdObj  Update Object Components
4.  OECache   DataSet Caching
5.  OEMstDet  Master-Detail Relationship
6.  OEiSQL    Interactive SQL
7.  OEiGrid   Interactive Grid
8.  OEBulk    Bulk Operations
9.  OESearch  Cancelable Queries
10. OEProc    Stored Procedures
11. OEIsapi   ODBCExpress and ISAPI
12. OESetup   ODBC Setup
13. OEXplore  ODBC Explorer
14. OEInfo    ODBC Information
15. OECopy    Copy Bulk Data


OELoad Project
--------------

Concepts used in the demo are DataSource listing, schema creation,
transactioning and SQL operations.

This demo uses the TOESchema component to load tables in a database of your
choice.  It then uses the THstmt component to load rows into these tables, as
well as some text and binary blob fields.  It also illustrates simple
transactioning.

The demo is written very generally and might require some customization for the
ODBC driver you are using.  For example, one of the tables contains two blob
fields, and a database like Oracle can only have one blob field per table.
Also, the data types set up in the TOESchema component might not be supported by
all databases, and therefore might have to be substituted for similar ones.

The tables and rows loaded by this demo will be referred to as examples by
subsequent demos and documentation.

This demo works as-is with MS SQL Server, Sybase SQL Anywhere and similar
databases.  To use it with MS Access and similar databases, set the
OESchema1.NameConstraints property to True to enable alternative table
constraint generation.


OEVisual Project
----------------

Concepts used in the demo are DataSource listing, using Delphi data-aware
controls and how to use SQL Generation to positionally modify rows in a result
set.

This demo illustrates how to populate Delphi data-aware controls from
ODBCExpress result sets using the TOEDataSet component.  It makes use of the
Students table loaded at a database of your choice.  If you've modified the
Students table loaded in the previous demo, then this demo might require some
modification as well.

The demo also illustrates 3 of the 4 levels of SQL Generation available in
ODBCExpress, which is used to modify data in the result set of a TOEDataSet.
All 3 of these levels might not work with all databases.  To get a better
understanding of the levels of SQL Generation, see the ODBCExpress documentation
such as the white paper and the help file on this topic.

This demo works as-is with MS SQL Server, MS Access and similar databases.  For
databases which do not support bi-directional cursors directly, you have to make
use of the cursor library or cache.


OEUpdObj Project
----------------

Concepts used in the demo are using Delphi data-aware controls and how to use
the update object components to positionally modify rows in a result set.

This demo populates the Delphi data-aware grid using the TOEDataSet component
and then illustrates how to perform level 4 SQL Generation using the two update
object components TOEUpdateSQL and TOEUpdateProc.  This level will work with all
databases.

The demo makes use of the Students table.  See the OEProc demo description for
comments on the hard-coded DataSource and the stored procedure code used in this
demo.

This demo works as-is with MS SQL Server, SQL Anywhere and similar databases.
For other databases you might have to modify the stored procedure loading code.


OECache Project
---------------

Concepts used in the demo are using Delphi data-aware controls together with a
cached result set and cached updates.

This demo populates Delphi data-aware controls with records from the Students
table, making use of a front-end cache to provide the bi-directional scrolling
capabilities.  It also allows you to cache insert, update and delete operations
and then apply, cancel or revert them.

This demo works as-is with most databases.


OEMstDet Project
----------------

Concepts used in the demo are DataSource listing and using Delphi data-aware
controls in a master-detail relationship.

This demo populates a Delphi data-aware grid with records from the Students
table and also populates a second data-aware grid with records from the Takes
table, depending on the value of the student number (SNo) field in the current
row of the Students grid.  It also allows you to edit the records.

This demo works as-is with most databases.  For databases which do not support
bi-directional cursors directly, you have to make use of the cursor library.


OEiSQL Project
--------------

Concepts used in the demo are DataSource listing, external ODBC calls,
transactioning and bulk fetching.

This demo is a simple Interactive SQL example, which you can use to perform
queries and modifications at a database of your choice.  It makes use of the
THstmt component to perform these operations, and also illustrates the bulk
fetching capabilities of the THstmt component.

This demo works as-is with any database which supports transactioning.  To use
with databases which do not support transactioning, remove the StartTransact and
EndTransact statements.

This demo works as-is with most databases.  For databases which do not support
transactions, you have to remove the transactioning code.


OEiGrid Project
---------------

Concepts used in the demo are DataSource listing and using Delphi data-aware
controls.

This demo allows you to view data in the tables at a database of your choice.
It makes use of the TOEDataSet component to fill a Delphi TDBGrid with the data
in the tables.

Though the grid is not editable by default, it should be a simple exercise to
make the grid editable using one of the 4 level of SQL Generation (illustrated
by the OEVisual demo) to allow you to modify data at the database.

This demo works as-is with most databases.  For databases which do not support
bi-directional cursors directly, you have to make use of the cursor library.


OEBulk Project
--------------

Concepts used in the demo are bulk operations.

This demo illustrates the bulk insert, select and update capabilities of the
THstmt component.  The THstmt component is mostly selected over the TOEDataSet
for operations which doesn't require direct visual interaction with the user.
It also is the component of choice in non-visual environments where such direct
interaction is absent by definition.

This demo also makes use of the Students table, however the DataSource used is
hard-coded in the THdbc connection object and will require to be changed to an
appropriate DataSource on your system at which you loaded the Students table.

This demo works as-is with any database which supports this functionality.


OESearch Project
----------------

Concepts used in the demo are asynchronous, cancelable queries.

This demo illustrates how to make use of cancelable queries with ODBCExpress.
It allows you to open a query on a TOEDataSet and then abort the query if
necessary.  Though the demo illustrates the process using the TOEDataSet
component, it is very similar using the THstmt component.

This demo searches the Comment field of the Students table, however this causes
the query to return too quickly to clearly demonstrate the process.  You should
modify the code to search one of your very large databases (using a query you
know to take a long time) to clearly see the benefits of cancelable queries.

This demo works as-is with any database which supports this functionality.


OEProc Project
--------------

Concepts used in the demo are loading and executing stored procedures.

This demo is a more database specific one and allows you to load, run and drop
stored procedures at a Microsoft SQL Server or Sybase SQL Anywhere database.
Again the DataSource is hard-coded to a Microsoft SQL Server database and
requires some modification.

It should be pretty simple to modify the stored procedures to work with another
database, once you understand how stored procedures work with both the THstmt
and TOEDataSet components.

The code used to load the stored procedures can't be written generically, since
there is no standard syntax to do this.  All other code (dropping and running
the stored procedures) are written generically to work the same for any
database.

This demo works as-is with MS SQL Server, SQL Anywhere and similar databases.
For other databases you might have to modify the stored procedure loading code.


OEIsapi Project
---------------

Concepts used in the demo are non-visual environments and web development.

This demo illustrates how to use ODBCExpress in a non-visual environment, such
as the well-known ISAPI web environment.  It makes use of the Delphi web
components to create an ISAPI DLL which makes use of ODBCExpress to capture data
from a web browser to a database.

The demo uses the following table, which you'll have to create in a database of
your choice, accessible from your web server.  Also, you will have to create a
system DataSource on your web server which points to this database:

UserInfo(Name Char(40),
         Surname Char(40),
         Age Integer,
         EMail Char(20),
         Country Char(30))

This demo works as-is with any database.

Note: This demo is not shipped with the software, but can seperately be
      downloaded from the ODBCExpress site.


OESetup Project
---------------

Concepts used in the demo are DataSource manipulation and installing ODBC and
ODBC drivers.

The OESetup demo illustrates how to make use of the TOESetup component to
automatically install ODBC and your ODBC drivers on a machine.  It also shows
you how to create, modify and delete a DataSource using code.

An .INF, as indicated by the "InfFile" property of the TOESetup component is
used to list the files to be installed.  The INF file distributed with this demo
is specific to an ODBC 2.5 setup.

This demo is database independent.

Note: This demo is not shipped with the Kylix version, since the TOESetup
      component functionality is not supported on Linux.


OEXplore Project
----------------

Concepts used in this demo are DataSource management and retrieving database
catalog information.

This demo illustrates how to explore data in a database.  It uses the
TOEAdministrator component to list and manipulate DataSources, as well as the
TOECatalog component to list table and stored procedure information for each
DataSource.

This demo is database independent.


OEInfo Project
--------------

Concepts used in this demo are DataSource listing and ODBC information
retrieval.

This demo illustrates how to use some of the provided methods to retrieve
information about ODBC, your ODBC driver and your database.  For a complete list
of constants which can be used together with these information methods, see the
Microsoft documentation on ODBC.  This demo also allows you to write the
information to a file which can be used for debugging and support purposes.

This demo is database independent.


OECopy Project
--------------

Concepts used in the demo are DataSource listing, schema creation and copying of
bulk data.

This demo illustrates how to make use of the TOEBulkCopy component to copy data
from a source database to a target database.  Set the Source Database to the
database which contains the Students, Courses and Takes tables.  Set the Target
Database to another database which does not contain any of these tables.

When clicking one of the 4 buttons, a TOESchema component will be used to drop
the above 3 tables from the target database (if they exist) and load them again
at the target database, before it uses the TOEBulkCopy component to copy the
data from the source to the target.

This demo works as-is with any database which supports this functionality.
