This update includes enhancements to C_DATA to allow indexing of
non-struct C_DATA columns along with the ability to use C_DATA
columns in a where predicate list.  Scalar functions, (UCASE() etc..)
will not work with C_DATA.

We've added 3 new SQL API functions to work with C_DATA.

SQLAllocCData(), SQLFreeCData() and SQLSetCData().

SQLAllocDData will allocate a C_DATA handle which can be used with
SQLSetParam when sending a C_DATA structure to the server via a
parameter marker.

SQLSetCData is used to set the address of C_DATA variable within the
handle.

SQLFreeCData will free and release a C_DATA handle.







------SCEMA EXAMPLE---------------------------------------------------
create database c_db on sqldev;

create table c_table (
    sname      char(50),
    dname      c_data char[51][2]
);

create index s_idx on c_table(sname);
create index d_idx on c_table(dname);
----------------------------------------------------------------------


------CODE EXAMPLE----------------------------------------------------

static HCDATA hCData;


SQLAllocCData(hDbc, "c_db", SQL_NTS, "c_table", SQL_NTS, 
                    "dname", SQL_NTS, &hCData);

/* find exact match */
SQLPrepare(hStmt, "select sname from c_table where dname = ?", SQL_NTS);
SQLSetParam(hStmt, 1, SQL_C_DATA, SQL_CDATA, 0, 0, hCData, &cDataLen);
SQLSetCData(hCData, ct.dname);
SQLBindCol(hStmt, 1, SQL_CHAR, ct.sname, sizeof(ct.sname), NULL);

SQLExecute(hStmt);

while (SQLFetch(hStmt) == SQL_SUCCESS) {
    printf ("%s\n", ct.sname);
}
SQLFreeStmt(hStmt, SQL_CLOSE);


/* find all where dname matches first double byte char */
SQLPrepare(hStmt, "select sname from c_table where dname like ?", SQL_NTS);
SQLSetParam(hStmt, 1, SQL_C_DATA, SQL_CDATA, 0, 0, hCData, &cDataLen);
SQLSetCData(hCData, ct.dname);
SQLBindCol(hStmt, 1, SQL_CHAR, ct.sname, sizeof(ct.sname), NULL);

/* wild char */
ct.dname[1][0] = '%';
ct.dname[1][1] = '\0';

/* doulble null */
ct.dname[2][0] = '\0';
ct.dname[2][1] = '\0';

SQLExecute(hStmt);

while (SQLFetch(hStmt) == SQL_SUCCESS) {
    printf ("%s\n", ct.sname);
}
SQLFreeStmt(hStmt, SQL_CLOSE);


SQLFreeCData(hCData);

----------------------------------------------------------------------
