DataHub ODBC Scripting

Version 6.4

March 10, 2010

A user's guide to ODBC (Open DataBase Connectivity) scripting for the Cascade DataHub.

Copyright, trademark, and software license information.

Table of Contents


1. Introduction
1.1. Overview
1.2. Setting up a DSN (Data Source Name)
1.3. Working with MS Access

2. Tutorials
2.1. Tutorial 1: Writing new rows to a table, based on a trigger
2.2. Tutorial 2: Updating existing rows, or writing new ones
2.3. Tutorial 3: Writing data from a database to the DataHub
2.4. Viewing data from a web browser

3. An Explanation of the Tutorial Code
3.1. Define the Application Object
3.2. Interactions with the Database
3.2.1. Connecting to the Database
3.2.2. Creating a Gamma Class from a Database Table
3.2.3. Querying Rows from the Database
3.2.4. Inserting Rows into a Database
3.2.5. Updating Existing Rows in a Database
3.2.6. Creating a Database Table
3.3. Set up Event Handlers
3.4. Shut Down

4. Multi-Threaded ODBC Interface
4.1. How-To
4.1.1. Create an ODBCThread Instance
4.1.2. Attach Event Callbacks
4.1.3. Configure Startup Actions
4.1.4. Start the Database Thread
4.2. Store and Forward
4.2.1. Time Delayed Writes
4.3. Example

5. Classes
DATE_STRUCT - contains dates (y,m,d).
ODBCColumn -
ODBCConnection - allocates a connection handle.
ODBCDescriptor - allocates a descriptor handle.
ODBCEnvironment - allocates an environment handle.
ODBCHandle - a parent class for connections, descriptors, environments, and statements.
ODBCResult -
ODBCStatement - allocates a statement handle.
ODBCThread - configures the multi-threaded ODBC interface.
ODBCThreadResult - the results of an SQL command.
SQLGUID - holds ID strings.
SQL_DAY_SECOND_STRUCT - contains time data for SQL_INTERVAL_STRUCT.
SQL_INTERVAL_STRUCT - contains interval data for SQL queries.
SQL_INTERVAL_STRUCT_intval - contains year/month or day/second info for SQL_INTERVAL_STRUCT.
SQL_NUMERIC_STRUCT - specifies number precision and sign.
SQL_YEAR_MONTH_STRUCT - contains year and month data for SQL_INTERVAL_STRUCT.
TIMESTAMP_STRUCT - contains timestamp data (y,m,d,h,m,s, etc.).
TIME_STRUCT - contains time data (h,m,s).

6. Global Functions
ODBC_AllocEnvironment - creates an ODBCEnvironment.
ODBC_ValueString -

7. Constants

Index