List:Commits« Previous MessageNext Message »
From:pharvey Date:January 3 2006 3:47am
Subject:Connector/ODBC 5 commit: r24 - / MYODBCDbg/MYODBCDbgLib MYODBCDbg/include MYODBCDes MYODBCDes/MYODBCDesLib MYODBCDes/MYODBCDesTest MYODBCDes/include
View as plain text  
Added:
   MYODBCDes/MYODBCDesLib/MYODBCDes.cpp
   MYODBCDes/MYODBCDesLib/MYODBCDesAPD.cpp
   MYODBCDes/MYODBCDesLib/MYODBCDesARD.cpp
   MYODBCDes/MYODBCDesLib/MYODBCDesIPD.cpp
   MYODBCDes/MYODBCDesLib/MYODBCDesIRD.cpp
   MYODBCDes/MYODBCDesLib/MYODBCDesRecord.cpp
   MYODBCDes/MYODBCDesLib/MYODBCDesRecord.h
   MYODBCDes/MYODBCDesTest/MYODBCDesTest.cpp
   MYODBCDes/include/MYODBCDesAPD.h
   MYODBCDes/include/MYODBCDesARD.h
   MYODBCDes/include/MYODBCDesIPD.h
   MYODBCDes/include/MYODBCDesIRD.h
Removed:
   MYODBCDes/MYODBCDesTest/MYODBCDesTest.c
Modified:
   MYODBCDbg/MYODBCDbgLib/MYODBCDbg.cpp
   MYODBCDbg/include/MYODBCDbg.h
   MYODBCDes/MYODBCDes.vpj
   MYODBCDes/MYODBCDesLib/MYODBCDesAlloc.c
   MYODBCDes/MYODBCDesLib/MYODBCDesInternal.h
   MYODBCDes/MYODBCDesLib/MYODBCDesLib.vpj
   MYODBCDes/include/MYODBCDes.h
   root.pro
Log:
UNICODE:
- most of the unicode enabled and objectified code for descriptors
- does not build but more changes, to complete descriptors, in next day or two

Modified: MYODBCDbg/MYODBCDbgLib/MYODBCDbg.cpp
===================================================================
--- MYODBCDbg/MYODBCDbgLib/MYODBCDbg.cpp	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDbg/MYODBCDbgLib/MYODBCDbg.cpp	2006-01-03 03:47:25 UTC (rev 24)
@@ -71,7 +71,7 @@
 */
 void MYODBCDbg::doEnter( const char *pszFile, int nLine, const char *pszFunction )
 {
-    *this << QString( "%1:%2: %3\n\t[ENTER  ] " )
+    *this << QString( "%1:%2: %3 [ENTER  ] " )
                 .arg( pszFile )
                 .arg( nLine )
                 .arg( pszFunction ) << endl;
@@ -94,7 +94,7 @@
 */
 SQLRETURN MYODBCDbg::doReturn( const char *pszFile, int nLine, const char *pszFunction,
SQLRETURN nReturn )
 {
-    *this << QString( "%1:%2: %3\n\t[RETURN ] " )
+    *this << QString( "%1:%2: %3 [RETURN ] " )
                 .arg( pszFile )
                 .arg( nLine )
                 .arg( pszFunction ) << getReturnString( nReturn ) <<  endl;

Modified: MYODBCDbg/include/MYODBCDbg.h
===================================================================
--- MYODBCDbg/include/MYODBCDbg.h	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDbg/include/MYODBCDbg.h	2006-01-03 03:47:25 UTC (rev 24)
@@ -179,6 +179,31 @@
 */
 #define MYODBCDbgReturn(A) return(gpMYODBCDbg ? gpMYODBCDbg->doReturn( __FILE__,
__LINE__, __FUNCTION__, A ) : A)
 
+#define MYODBCDbgReturn2() 
+{\
+if ( gpMYODBCDbg )\
+{\
+    QString stringHeader = QString( "%1:%2: %3 [RETURN ] " )\
+                            .arg( __FILE__ )\
+                            .arg( __LINE__ )\
+                            .arg( __FUNCTION__ );\
+    *gpMYODBCDbg << stringHeader << endl;\
+}\
+}
+
+#define MYODBCDbgReturn3(A) 
+{\
+if ( gpMYODBCDbg )\
+{\
+    QString stringHeader = QString( "%1:%2: %3 [RETURN ] %4" )\
+                            .arg( __FILE__ )\
+                            .arg( __LINE__ )\
+                            .arg( __FUNCTION__ )\
+                            .arg( A );\
+    *gpMYODBCDbg << stringHeader << endl;\
+}\
+}
+
 #else
 #define MYODBCDbgInit(A)     {}
 #define MYODBCDbgFini()      {}
@@ -187,6 +212,8 @@
 #define MYODBCDbgError(A,B)  {}
 #define MYODBCDbgWarning(A,B){}
 #define MYODBCDbgReturn(A) return(A)
+#define MYODBCDbgReturn2()   {}
+#define MYODBCDbgReturn3(A)  {}
 #endif
 
 #endif

Modified: MYODBCDes/MYODBCDes.vpj
===================================================================
--- MYODBCDes/MYODBCDes.vpj	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDes.vpj	2006-01-03 03:47:25 UTC (rev 24)
@@ -189,6 +189,10 @@
 			Name="Header Files"
 			Filters="*.h;*.H;*.hh;*.hpp;*.hxx;*.inc;*.sh;*.cpy;*.if">
 			<F N="include/MYODBCDes.h"/>
+			<F N="include/MYODBCDesAPD.h"/>
+			<F N="include/MYODBCDesARD.h"/>
+			<F N="include/MYODBCDesIPD.h"/>
+			<F N="include/MYODBCDesIRD.h"/>
 		</Folder>
 		<Folder
 			Name="Resource Files"

Added: MYODBCDes/MYODBCDesLib/MYODBCDes.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDes.cpp	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDes.cpp	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,1000 @@
+#include "MYODBCDesInternal.h"
+
+/*!
+    \brief  Allocates a new descriptor.
+
+            Allocates a new descriptor; initializing
+            fields based upon the requested type.
+
+            Descriptors know nothing about the driver
+            code itself - including its handles. 
+            Subsequently the caller will likely want to do
+            some processing to complete this request. For
+            example; add the descriptor to a list of 
+            descriptors in the owner handle.
+
+    \param  hOwner      The ODBC handle which will own the new
+                        descriptor. The type of handle which is
+                        viable depends upon the nDesType. 
+
+                        The handle should correspond to a 
+                        MYODBC_RTTI_TYPE.
+                    
+    \param  nDesType    The descriptor type to create.
+
+    \return MYODBC_DES_PTR
+
+    \retval A pointer to a viable descriptor.
+    \retval NULL if something went wrong.
+    
+    \sa     MYODBCDesFree() 
+            SQLAllocHandle()
+*/
+MYODBCDes::MYODBCDes( SQLHANDLE hOwner )
+{
+    MYODBCDbgEnter();
+
+    /* init header fields to most common values */
+    nTypeSubID           = MYODBC_RTTI_DES_UND;
+    nAllocType           = SQL_DESC_ALLOC_USER;
+    nArraySize           = 1;
+    pnArrayStatusPtr     = NULL;
+    pnBindOffsetPtr      = NULL;
+    nBindType            = SQL_BIND_BY_COLUMN;
+    pnRowsProcessedPtr   = NULL;
+
+    /* add bookmark record at index 0 */
+    /*
+        \internal ODBC Rule
+
+        When ColumnNumber is equal to 0 (for a bookmark column), 
+        SQL_BINARY is returned in *DataTypePtr for variable-length 
+        bookmarks. (SQL_INTEGER is returned if bookmarks are used 
+        by an ODBC 3.x application working with an ODBC 2.x driver 
+        or by an ODBC 2.x application working with an ODBC 3.x 
+        driver.)
+    */    
+    pdesrecord = new MYODBCDesRecord( this );
+    pdesrecord->nConciseType            = SQL_BINARY;
+    pdesrecord->nType                   = SQL_BINARY;
+    pdesrecord->nDatetimeIntervalCode   = 0;
+
+    /* associate with our owner (caller needs to add us to hOwner's list of descriptors)
*/
+    this->hOwner        = hOwner;
+
+    MYODBCDbgReturn2();
+}
+
+/*!
+    \brief  Release all resources used by the given descriptor.
+
+            This supports; SQLFreeHandle.
+    
+    \note   Caller should not let application try to explicitly free an 
+            implicit descriptor... such a call is an error. Here we free
+            the descriptor without regard to this because we may be called
+            for cleanup.
+
+            In the case where the descriptor is SQL_DESC_ALLOC_USER; the driver 
+            should disassociate the descriptor from any statements and the owning
+            dbc - then call this.
+
+    \param  pDes     A viable MYODBC_DES_PTR.
+    
+    \sa     MYODBCDesAlloc
+            SQLFreeHandle
+*/
+MYODBCDes::~MYODBCDes()
+{
+    MYODBCDbgEnter();
+
+    while ( !listRecords.isEmpty() )
+        delete listRecords[0];
+
+    MYODBCDbgReturn2();
+}
+
+SQLRETURN MYODBCDes::setArraySize( SQLUINTEGER nArraySize )
+{
+    MYODBCDbgEnter();
+
+    this->nArraySize = nArraySize;
+
+    MYODBCDbgReturn( SQL_SUCCESS );
+}
+
+SQLRETURN MYODBCDes::setArrayStatusPtr( SQLUSMALLINT *pnArrayStatusPtr )
+{
+    MYODBCDbgEnter();
+
+    this->pnArrayStatusPtr = pnArrayStatusPtr;
+
+    MYODBCDbgReturn( SQL_SUCCESS );
+}
+
+SQLRETURN MYODBCDes::setBindOffsetPtr( SQLINTEGER *pnBindOffsetPtr )
+{
+    MYODBCDbgEnter();
+
+    this->pnBindOffsetPtr = pnBindOffsetPtr;
+
+    MYODBCDbgReturn( SQL_SUCCESS );
+}
+
+SQLRETURN MYODBCDes::setBindType( SQLINTEGER nBindType )
+{
+    MYODBCDbgEnter();
+
+    this->nBindType = nBindType;
+
+    MYODBCDbgReturn( SQL_SUCCESS );
+}
+
+/*!
+    \brief  Expands or shrinks list of records.
+            
+            Expands or shrinks list of records while trying to account for some
+            rules stated in the ODBC spec in regard to maintaining the records list.
+
+    \param  pDes        any type of descriptor
+    \param  nCount      the desired value for SQL_DESC_COUNT (0-n), records appended 
+                        or truncated as needed
+    \param  bUnbind     - True  - is ok to truncate records which are bound
+                        - False - never truncate a bound record (in this case num-recs 
+                        could be > count)
+    \return MYODBC_C_BOOL
+
+    \retval MYODBC_C_TRUE   success (its possible to have success but count < 
+                            SQL_DESC_COUNT)
+    \retval MYODBC_C_FALSE  failed
+*/
+SQLRETURN MYODBCDes::setCount( SQLSMALLINT nCount )
+{
+    MYODBCDbgEnter();
+
+    /* We should always have a bookmark record at index 0. */
+    if ( nCount < 0 )
+        return false;
+
+    /* append */
+    while ( nCount > listRecords.count() )
+    {
+        new MYODBCDesRecord( this );
+    }
+
+    /* truncate */
+    while ( listRecords.count() > nCount )
+    {
+        /* do not delete bound records */
+        if ( listRecords.last()->getDataPtr() )
+            break;
+
+        delete listRecords.last();
+    }
+
+    MYODBCDbgReturn( SQL_SUCCESS );
+}
+
+SQLRETURN MYODBCDes::setRowsProcessedPtr( SQLUINTEGER *pnRowsProcessedPtr )
+{
+    MYODBCDbgEnter();
+
+    this->pnRowsProcessedPtr = pnRowsProcessedPtr;
+
+    MYODBCDbgReturn( SQL_SUCCESS );
+}
+
+SQLRETURN MYODBCDes::setAutoUniqueValue( SQLSMALLINT nRecord, SQLINTEGER nAutoUniqueValue
)
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setAutoUniqueValue( nAutoUniqueValue ) );
+}
+
+SQLRETURN MYODBCDes::setBaseColumnName( SQLSMALLINT nRecord, const QString
&stringBaseColumnName )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setBaseColumnName( stringBaseColumnName )
);
+}
+
+SQLRETURN MYODBCDes::setBaseTableName( SQLSMALLINT nRecord, const QString
&stringBaseTableName )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setBaseTableName( stringBaseTableName ) );
+}
+
+SQLRETURN MYODBCDes::setCaseSensitive( SQLSMALLINT nRecord, SQLINTEGER nCaseSensitive )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setCaseSensitive( nCaseSensitive ) );
+}
+
+SQLRETURN MYODBCDes::setCatalogName( SQLSMALLINT nRecord, const QString
&stringCatalogName )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setCatalogName( stringCatalogName ) );
+}
+
+SQLRETURN MYODBCDes::setConciseType( SQLSMALLINT nRecord, SQLSMALLINT nConciseType )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setConciseType( nConciseType ) );
+}
+
+SQLRETURN MYODBCDes::setDataPtr( SQLSMALLINT nRecord, SQLPOINTER pDataPtr )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setDataPtr( pDataPtr ) );
+}
+
+SQLRETURN MYODBCDes::setDatetimeIntervalCode( SQLSMALLINT nRecord, SQLSMALLINT
nDatetimeIntervalCode )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setDatetimeIntervalCode(
nDatetimeIntervalCode ) );
+}
+
+SQLRETURN MYODBCDes::setDatetimeIntervalPrecision( SQLSMALLINT nRecord, SQLINTEGER
nDatetimeIntervalPrecision )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setDatetimeIntervalPrecision(
nDatetimeIntervalPrecision ) );
+}
+
+SQLRETURN MYODBCDes::setDisplaySize( SQLSMALLINT nRecord, SQLINTEGER nDisplaySize )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setDisplaySize( nDisplaySize ) );
+}
+
+SQLRETURN MYODBCDes::setFixedPrecScale( SQLSMALLINT nRecord, SQLSMALLINT nFixedPrecScale
)
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setFixedPrecScale( nFixedPrecScale ) );
+}
+
+SQLRETURN MYODBCDes::setIndicatorPtr( SQLSMALLINT nRecord, SQLINTEGER *pnIndicatorPtr )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setIndicatorPtr( pnIndicatorPtr ) );
+}
+
+SQLRETURN MYODBCDes::setLabel( SQLSMALLINT nRecord, const QString &stringLabel )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setLabel( stringLabel ) );
+}
+
+SQLRETURN MYODBCDes::setLength( SQLSMALLINT nRecord, SQLUINTEGER nLength )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setLength( nLength ) );
+}
+
+SQLRETURN MYODBCDes::setLiteralPrefix( SQLSMALLINT nRecord, const QString
&stringLiteralPrefix )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setLiteralPrefix( stringLiteralPrefix ) );
+}
+
+SQLRETURN MYODBCDes::setLiteralSuffix( SQLSMALLINT nRecord, const QString
&stringLiteralSuffix )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setLiteralSuffix( stringLiteralSuffix ) );
+}
+
+SQLRETURN MYODBCDes::setLocalTypeName( SQLSMALLINT nRecord, const QString
&stringLocalTypeName )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setLocalTypeName( stringLocalTypeName ) );
+}
+
+SQLRETURN MYODBCDes::setName( SQLSMALLINT nRecord, const QString &stringName )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setName( stringName ) );
+}
+
+SQLRETURN MYODBCDes::setNullable( SQLSMALLINT nRecord, SQLSMALLINT nNullable )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setNullable( nNullable ) );
+}
+
+SQLRETURN MYODBCDes::setNumPrecRadix( SQLSMALLINT nRecord, SQLINTEGER nNumPrecRadix )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setNumPrecRadix( nNumPrecRadix ) );
+}
+
+SQLRETURN MYODBCDes::setOctetLength( SQLSMALLINT nRecord, SQLINTEGER nOctetLength )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setOctetLength( nOctetLength ) );
+}
+
+SQLRETURN MYODBCDes::setOctetLengthPtr( SQLSMALLINT nRecord, SQLINTEGER *pnOctetLengthPtr
)
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setOctetLengthPtr( pnOctetLengthPtr ) );
+}
+
+SQLRETURN MYODBCDes::setParamterType( SQLSMALLINT nRecord, SQLSMALLINT nParamterType )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setParamterType( nParamterType ) );
+}
+
+SQLRETURN MYODBCDes::setPrecision( SQLSMALLINT nRecord, SQLSMALLINT nPrecision )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setPrecision( nPrecision ) );
+}
+
+SQLRETURN MYODBCDes::setRowver( SQLSMALLINT nRecord, SQLSMALLINT nRowver )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setRowver( nRowver ) );
+}
+
+SQLRETURN MYODBCDes::setScale( SQLSMALLINT nRecord, SQLSMALLINT nScale )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setScale( nScale ) );
+}
+
+SQLRETURN MYODBCDes::setSchemaName( SQLSMALLINT nRecord, const QString
&stringSchemaName )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setSchemaName( stringSchemaName ) );
+}
+
+SQLRETURN MYODBCDes::setSearchable( SQLSMALLINT nRecord, SQLSMALLINT nSearchable )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setSearchable( nSearchable ) );
+}
+
+SQLRETURN MYODBCDes::setTableName( SQLSMALLINT nRecord, const QString
&stringTableName )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setTableName( stringTableName ) );
+}
+
+SQLRETURN MYODBCDes::setType( SQLSMALLINT nRecord, SQLSMALLINT nType );
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setType( nType ) );
+}
+
+SQLRETURN MYODBCDes::setTypeName( SQLSMALLINT nRecord, const QString &stringTypeName
)
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setTypeName( stringTypeName ) );
+}
+
+SQLRETURN MYODBCDes::setUnnamed( SQLSMALLINT nRecord, SQLSMALLINT nUnnamed )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setUnnamed( nUnnamed ) );
+}
+
+SQLRETURN MYODBCDes::setUnsigned( SQLSMALLINT nRecord, SQLSMALLINT nUnsigned )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setUnsigned( nUnsigned ) );
+}
+
+SQLRETURN MYODBCDes::setUpdatable( SQLSMALLINT nRecord, SQLSMALLINT nUpdatable )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 || nRecord >= listRecords.count() )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+
+    MYODBCDbgReturn( listRecords[nRecord]->setUpdatable( nUpdatable ) );
+}
+
+
+SQLSMALLINT MYODBCDes::getAllocType()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( nAllocType );
+}
+
+SQLUINTEGER MYODBCDes::getArraySize()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( nArraySize );
+}
+
+SQLUSMALLINT *MYODBCDes::getArrayStatusPtr()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( pnArrayStatusPtr );
+}
+
+SQLINTEGER *MYODBCDes::getBindOffsetPtr()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( nBindOffsetPtr );
+}
+
+SQLINTEGER MYODBCDes::getBindType()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( nBindType );
+}
+
+SQLSMALLINT MYODBCDes::getCount()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( listRecords.count() );
+}
+
+SQLUINTEGER *MYODBCDes::getRowsProcessedPtr()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( pnRowsProcessedPtr );
+}
+
+
+SQLINTEGER  MYODBCDes::getAutoUniqueValue( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getAutoUniqueValue() );
+}
+
+QString     MYODBCDes::getBaseColumnName( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getBaseColumnName() );
+}
+
+QString     MYODBCDes::getBaseTableName( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getBaseTableName() );
+}
+
+SQLINTEGER  MYODBCDes::getCaseSensitive( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getCaseSensitive() );
+}
+
+QString     MYODBCDes::getCatalogName( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getCatalogName() );
+}
+
+SQLSMALLINT MYODBCDes::getConciseType( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getConciseType() );
+}
+
+SQLPOINTER  MYODBCDes::getDataPtr( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getDataPtr() );
+}
+
+SQLSMALLINT MYODBCDes::getDatetimeIntervalCode( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getDatetimeIntervalCode() );
+}
+
+SQLINTEGER  MYODBCDes::getDatetimeIntervalPrecision( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getDatetimeIntervalPrecision() );
+}
+
+SQLINTEGER  MYODBCDes::getDisplaySize( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getDisplaySize() );
+}
+
+SQLSMALLINT MYODBCDes::getFixedPrecScale( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getFixedPrecScale() );
+}
+
+SQLINTEGER *MYODBCDes::getIndicatorPtr( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getIndicatorPtr() );
+}
+
+QString     MYODBCDes::getLabel( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getLabel() );
+}
+
+SQLUINTEGER MYODBCDes::getLength( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getLength() );
+}
+
+QString     MYODBCDes::getLiteralPrefix( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getLiteralPrefix() );
+}
+
+QString     MYODBCDes::getLiteralSuffix( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getLiteralSuffix() );
+}
+
+QString     MYODBCDes::getLocalTypeName( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getLocalTypeName() );
+}
+
+QString     MYODBCDes::getName( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getName() );
+}
+
+SQLSMALLINT MYODBCDes::getNullable( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getNullable() );
+}
+
+SQLINTEGER  MYODBCDes::getNumPrecRadix( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getNumPrecRadix() );
+}
+
+SQLINTEGER  MYODBCDes::getOctetLength( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getOctetLength() );
+}
+
+SQLINTEGER *MYODBCDes::getOctetLengthPtr( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getOctetLengthPtr() );
+}
+
+SQLSMALLINT MYODBCDes::getParamterType( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getParamterType() );
+}
+
+SQLSMALLINT MYODBCDes::getPrecision( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getPrecision() );
+}
+
+SQLSMALLINT MYODBCDes::getRowver( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getRowver() );
+}
+
+SQLSMALLINT MYODBCDes::getScale( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getScale() );
+}
+
+QString     MYODBCDes::getSchemaName( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getSchemaName() );
+}
+
+SQLSMALLINT MYODBCDes::getSearchable( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getSearchable() );
+}
+
+QString     MYODBCDes::getTableName( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getTableName() );
+}
+
+SQLSMALLINT MYODBCDes::getType( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getType() );
+}
+
+QString     MYODBCDes::getTypeName( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getTypeName() );
+}
+
+SQLSMALLINT MYODBCDes::getUnnamed( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getUnnamed() );
+}
+
+SQLSMALLINT MYODBCDes::getUnsigned( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getUnsigned() );
+}
+
+SQLSMALLINT MYODBCDes::getUpdatable( SQLSMALLINT nRecord )
+{
+    MYODBCDbgEnter();
+
+    if ( nRecord < 0 )
+        MYODBCDbgReturn( dia.doAppend( MYODBC_DIA_07009, 0, NULL ) );
+    if ( nRecord >= listRecords.count() )
+        MYODBCDbgReturn( SQL_NO_DATA );
+
+    MYODBCDbgReturn3( listRecords[nRecord]->getUpdatable() );
+}
+
+SQLHANDLE MYODBCDes::getOwner()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( hOwner );
+}
+
+MYODBC_RTTI_DES_TYPE MYODBCDes::getDesType()
+{
+    MYODBCDbgEnter();
+
+    MYODBCDbgReturn3( nDesType );
+}
+
+

Added: MYODBCDes/MYODBCDesLib/MYODBCDesAPD.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesAPD.cpp	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesAPD.cpp	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,25 @@
+#include "MYODBCDesInternal.h"
+
+MYODBCDesAPD::MYODBCDesAPD( SQLHANDLE hOwner )
+{
+    nTypeSubID = MYODBC_RTTI_DES_APD;
+}
+
+SQLRETURN MYODBCDesAPD::setRowsProcessedPtr( SQLUINTEGER *pnRowsProcessedPtr )
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Setting SQL_DESC_ROWS_PROCESSED_PTR
is not relevant in this context.") );
+
+    this->pnRowsProcessedPtr = pnRowsProcessedPtr;
+
+    return SQL_SUCCESS_WITH_INFO;
+}
+
+SQLUINTEGER *MYODBCDesAPD::getRowsProcessedPtr()
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Getting SQL_DESC_ROWS_PROCESSED_PTR
is not relevant in this context.") );
+
+    return pnRowsProcessedPtr;
+}
+

Added: MYODBCDes/MYODBCDesLib/MYODBCDesARD.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesARD.cpp	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesARD.cpp	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,25 @@
+#include "MYODBCDesInternal.h"
+
+MYODBCDesARD::MYODBCDesARD( SQLHANDLE hOwner )
+{
+    nTypeSubID = MYODBC_RTTI_DES_ARD;
+}
+
+SQLRETURN MYODBCDesARD::setRowsProcessedPtr( SQLUINTEGER *pnRowsProcessedPtr )
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Setting SQL_DESC_ROWS_PROCESSED_PTR
is not relevant in this context.") );
+
+    this->pnRowsProcessedPtr = pnRowsProcessedPtr;
+
+    return SQL_SUCCESS_WITH_INFO;
+}
+
+SQLUINTEGER *MYODBCDesARD::getRowsProcessedPtr()
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Getting SQL_DESC_ROWS_PROCESSED_PTR
is not relevant in this context.") );
+
+    return pnRowsProcessedPtr;
+}
+

Modified: MYODBCDes/MYODBCDesLib/MYODBCDesAlloc.c
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesAlloc.c	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesAlloc.c	2006-01-03 03:47:25 UTC (rev 24)
@@ -12,6 +12,7 @@
 
 #include "MYODBCDesInternal.h"
 
+
 MYODBC_DES_PTR MYODBCDesAlloc( SQLHANDLE hOwner, MYODBC_RTTI_DES_TYPE nDesType )
 {
     MYODBC_DES_PTR      pDes        = NULL;

Added: MYODBCDes/MYODBCDesLib/MYODBCDesIPD.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesIPD.cpp	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesIPD.cpp	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,62 @@
+#include "MYODBCDesInternal.h"
+
+MYODBCDesIPD::MYODBCDesIPD( SQLHANDLE hOwner )
+{
+    nTypeSubID = MYODBC_RTTI_DES_IPD;
+}
+
+SQLRETURN MYODBCDesIPD::setArraySize( SQLUINTEGER nArraySize )
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Setting SQL_DESC_ARRAY_SIZE is not
relevant in this context.") );
+
+    this->nArraySize = nArraySize;
+
+    return SQL_SUCCESS_WITH_INFO;
+}
+
+SQLRETURN MYODBCDesIPD::setBindOffsetPtr( SQLINTEGER *pnBindOffsetPtr )
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Setting SQL_DESC_BIND_OFFSET_PTR is
not relevant in this context.") );
+
+    this->pnBindOffsetPtr = pnBindOffsetPtr;
+
+    return SQL_SUCCESS_WITH_INFO;
+}
+
+SQLRETURN MYODBCDesIPD::setBindType( SQLINTEGER nBindType )
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Setting SQL_DESC_BIND_TYPE is not
relevant in this context.") );
+
+    this->nBindType = nBindType;
+
+    return SQL_SUCCESS_WITH_INFO;
+}
+
+SQLUINTEGER MYODBCDesIPD::getArraySize()
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Getting SQL_DESC_ARRAY_SIZE is not
relevant in this context.") );
+
+    return nArraySize;
+}
+
+SQLINTEGER *MYODBCDesIPD::getBindOffsetPtr()
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Getting SQL_DESC_BIND_OFFSET_PTR is
not relevant in this context.") );
+
+    return pnBindOffsetPtr;
+}
+
+SQLINTEGER MYODBCDesIPD::getBindType()
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Getting SQL_DESC_BIND_TYPE is not
relevant in this context.") );
+
+    return nBindType;
+}
+
+

Added: MYODBCDes/MYODBCDesLib/MYODBCDesIRD.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesIRD.cpp	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesIRD.cpp	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,60 @@
+MYODBCDesIRD::MYODBCDesIRD( SQLHANDLE hOwner )
+{
+    nTypeSubID = MYODBC_RTTI_DES_IRD;
+}
+
+SQLRETURN MYODBCDesIRD::setArraySize( SQLUINTEGER nArraySize )
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Setting SQL_DESC_ARRAY_SIZE is not
relevant in this context.") );
+
+    this->nArraySize = nArraySize;
+
+    return SQL_SUCCESS_WITH_INFO;
+}
+
+SQLRETURN MYODBCDesIRD::setBindOffsetPtr( SQLINTEGER *pnBindOffsetPtr )
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Setting SQL_DESC_BIND_OFFSET_PTR is
not relevant in this context.") );
+
+    this->pnBindOffsetPtr = pnBindOffsetPtr;
+
+    return SQL_SUCCESS_WITH_INFO;
+}
+
+SQLRETURN MYODBCDesIRD::setBindType( SQLINTEGER nBindType )
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Setting SQL_DESC_BIND_TYPE is not
relevant in this context.") );
+
+    this->nBindType = nBindType;
+
+    return SQL_SUCCESS_WITH_INFO;
+}
+
+SQLUINTEGER MYODBCDesIRD::getArraySize()
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Getting SQL_DESC_ARRAY_SIZE is not
relevant in this context.") );
+
+    return nArraySize;
+}
+
+SQLINTEGER *MYODBCDesIRD::getBindOffsetPtr()
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Getting SQL_DESC_BIND_OFFSET_PTR is
not relevant in this context.") );
+
+    return pnBindOffsetPtr;
+}
+
+SQLINTEGER MYODBCDesIRD::getBindType()
+{
+    if ( pdia )
+        pdia->doAppend( MYODBC_DIA_01000, 0, tr("Getting SQL_DESC_BIND_TYPE is not
relevant in this context.") );
+
+    return nBindType;
+}
+
+

Modified: MYODBCDes/MYODBCDesLib/MYODBCDesInternal.h
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesInternal.h	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesInternal.h	2006-01-03 03:47:25 UTC (rev 24)
@@ -2,15 +2,12 @@
 #define MYODBC_DES_INTERNAL_H
 
 #include "../include/MYODBCDes.h"
+#include "MYODBCDesRecordAPD.h"
+#include "MYODBCDesRecordARD.h"
+#include "MYODBCDesRecordIPD.h"
+#include "MYODBCDesRecordIRD.h"
 
-/*
-    Most code had to be exposed because the structs have many fields in them
-    which are accessed frequently by calling code and creating setters/getters
-    does not seem worthwhile at this point - perhaps not at all.
-*/
 
-void MYODBCDesDump( MYODBC_DES_PTR pDes );
-void MYODBCDesRecDump( MYODBC_C_ULONGLONG nItem, MYODBC_DES_REC_PTR pDesRec );
 
 #endif
 

Modified: MYODBCDes/MYODBCDesLib/MYODBCDesLib.vpj
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesLib.vpj	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesLib.vpj	2006-01-03 03:47:25 UTC (rev 24)
@@ -184,11 +184,16 @@
 		<Folder
 			Name="Source Files"
 			Filters="*.c;*.C;*.cc;*.cpp;*.cp;*.cxx;*.prg;*.pas;*.dpr;*.asm;*.s;*.bas;*.java;*.cs;*.sc;*.e;*.cob;*.html;*.rc;*.tcl;*.py;*.pl">
+			<F N="MYODBCDes.cpp"/>
 			<F N="MYODBCDesAlloc.c"/>
+			<F N="MYODBCDesAPD.cpp"/>
+			<F N="MYODBCDesARD.cpp"/>
 			<F N="MYODBCDesCount.c"/>
 			<F N="MYODBCDesDump.c"/>
 			<F N="MYODBCDesFree.c"/>
 			<F N="MYODBCDesGetLength.c"/>
+			<F N="MYODBCDesIPD.cpp"/>
+			<F N="MYODBCDesIRD.cpp"/>
 			<F N="MYODBCDesMorph.c"/>
 			<F N="MYODBCDesRecAlloc.c"/>
 			<F N="MYODBCDesRecAllocExt.c"/>
@@ -204,6 +209,7 @@
 			<F N="MYODBCDesRecIrdInteger.c"/>
 			<F N="MYODBCDesRecIrdSmallInt.c"/>
 			<F N="MYODBCDesRecIrdVarChar.c"/>
+			<F N="MYODBCDesRecord.cpp"/>
 			<F N="MYODBCDesRecSetFreeExtra.c"/>
 			<F N="MYODBCDesRecsFree.c"/>
 			<F N="MYODBCDesRecType.c"/>
@@ -216,6 +222,7 @@
 			Name="Header Files"
 			Filters="*.h;*.H;*.hh;*.hpp;*.hxx;*.inc;*.sh;*.cpy;*.if">
 			<F N="MYODBCDesInternal.h"/>
+			<F N="MYODBCDesRecord.h"/>
 		</Folder>
 		<Folder
 			Name="Resource Files"

Added: MYODBCDes/MYODBCDesLib/MYODBCDesRecord.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesRecord.cpp	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesRecord.cpp	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,410 @@
+#include "MYODBCDesInternal.h"
+
+/*!
+    \brief  Allocate a descriptor record.
+    
+            Allocate a descriptor record. This may include some initialization
+            based upon the type requested.
+
+    \param  nType   Descriptor type.
+
+    \return MYODBC_DES_REC_PTR
+    
+    \sa     MYODBCDesRecFree
+*/    
+MYODBCDesRecord::MYODBCDesRecord( MYODBCDes *pdes )
+{
+    if ( pdes )
+    {
+        pdes->listRecords.append( this );
+    }
+}
+
+/*!
+    \brief  Frees all resources used by record.
+
+            Removes the nRecord from pDess array of records and
+            then frees the resources used by the record including the 
+            record itself.
+
+    \param  pDes A viable MYODBC_DES_PTR.
+    \param  nRecord     0 based
+
+    \return void
+
+    \sa     MYODBCDesRecAllocExt    
+*/
+MYODBCDesRecord::~MYODBCDesRecord()
+{
+    if ( pdes )
+        pdes->listRecords.removeAll( this );
+}
+
+bool MYODBCDesRecord::setAutoUniqueValue( SQLINTEGER nAutoUniqueValue )
+{
+    this->nAutoUniqueValue = nAutoUniqueValue;
+    return true;
+}
+
+bool MYODBCDesRecord::setBaseColumnName( const QString &stringBaseColumnName )
+{
+    this->stringBaseColumnName = stringBaseColumnName;
+    return true;
+}
+
+bool MYODBCDesRecord::setBaseTableName( const QString &stringBaseTableName )
+{
+    this->stringBaseTableName = stringBaseTableName;
+    return true;
+}
+
+bool MYODBCDesRecord::setCaseSensitive( SQLINTEGER nCaseSensitive )
+{
+    this->nCaseSensitive = nCaseSensitive;
+    return true;
+}
+
+bool MYODBCDesRecord::setCatalogName( const QString &stringCatalogName )
+{
+    this->stringCatalogName = stringCatalogName;
+    return true;
+}
+
+bool MYODBCDesRecord::setDataPtr( SQLPOINTER pDataPtr ) 
+{
+    this->pDataPtr = pDataPtr;
+    return true;
+}
+
+bool MYODBCDesRecord::setDatetimeIntervalCode( SQLSMALLINT nDatetimeIntervalCode )
+{
+    this->nDatetimeIntervalCode = nDatetimeIntervalCode;
+    return true;
+}
+
+bool MYODBCDesRecord::setDatetimeIntervalPrecision( SQLINTEGER nDatetimeIntervalPrecision
)
+{
+    this->nDatetimeIntervalPrecision = nDatetimeIntervalPrecision;
+    return true;
+}
+
+bool MYODBCDesRecord::setDisplaySize( SQLINTEGER nDisplaySize ) 
+{
+    this->nDisplaySize = nDisplaySize;
+    return true;
+}
+
+bool MYODBCDesRecord::setFixedPrecScale( SQLSMALLINT nFixedPrecScale )
+{
+    this->nFixedPrecScale = nFixedPrecScale;
+    return true;
+}
+
+bool MYODBCDesRecord::setIndicatorPtr( SQLINTEGER *pnIndicatorPtr )
+{
+    this->pnIndicatorPtr = pnIndicatorPtr;
+    return true;
+}
+
+bool MYODBCDesRecord::setLabel( const QString &stringLabel )
+{
+    this->stringLabel = stringLabel;
+    return true;
+}
+
+bool MYODBCDesRecord::setLength( SQLUINTEGER nLength )
+{
+    this->nLength = nLength;
+    return true;
+}
+
+bool MYODBCDesRecord::setLiteralPrefix( const QString &stringLiteralPrefix )
+{
+    this->stringLiteralPrefix = stringLiteralPrefix;
+    return true;
+}
+
+bool MYODBCDesRecord::setLiteralSuffix( const QString &stringLiteralSuffix )
+{
+    this->stringLiteralSuffix = stringLiteralSuffix;
+    return true;
+}
+
+bool MYODBCDesRecord::setLocalTypeName( const QString &stringLocalTypeName )
+{
+    this->stringLocalTypeName = stringLocalTypeName;
+    return true;
+}
+
+bool MYODBCDesRecord::setName( const QString &stringName )
+{
+    this->stringName = stringName;
+    return true;
+}
+
+bool MYODBCDesRecord::setNullable( SQLSMALLINT nNullable )
+{
+    this->nNullable = nNullable;
+    return true;
+}
+
+bool MYODBCDesRecord::setNumPrecRadix( SQLINTEGER nNumPrecRadix )
+{
+    this->nNumPrecRadix = nNumPrecRadix;
+    return true;
+}
+
+bool MYODBCDesRecord::setOctetLength( SQLINTEGER nOctetLength )
+{
+    this->nOctetLength = nOctetLength;
+    return true;
+}
+
+bool MYODBCDesRecord::setOctetLengthPtr( SQLINTEGER *pnOctetLengthPtr )
+{
+    this->pnOctetLengthPtr = pnOctetLengthPtr;
+    return true;
+}
+
+bool MYODBCDesRecord::setParamterType( SQLSMALLINT nParamterType )
+{
+    this->nParamterType = nParamterType;
+    return true;
+}
+
+bool MYODBCDesRecord::setPrecision( SQLSMALLINT nPrecision )
+{
+    this->nPrecision = nPrecision;
+    return true;
+}
+
+bool MYODBCDesRecord::setRowver( SQLSMALLINT nRowver )
+{
+    this->nRowver = nRowver;
+    return true;
+}
+
+bool MYODBCDesRecord::setScale( SQLSMALLINT nScale )
+{
+    this->nScale = nScale;
+    return true;
+}
+
+bool MYODBCDesRecord::setSchemaName( const QString &stringSchemaName )
+{
+    this->stringSchemaName = stringSchemaName;
+    return true;
+}
+
+bool MYODBCDesRecord::setSearchable( SQLSMALLINT nSearchable )
+{
+    this->nSearchable = nSearchable;
+    return true;
+}
+
+bool MYODBCDesRecord::setTableName( const QString &stringTableName )
+{
+    this->stringTableName = stringTableName;
+    return true;
+}
+
+bool MYODBCDesRecord::setTypeName( const QString &stringTypeName )
+{
+    this->stringTypeName = stringTypeName;
+    return true;
+}
+
+bool MYODBCDesRecord::setUnnamed( SQLSMALLINT nUnnamed )
+{
+    this->nUnnamed = nUnnamed;
+    return true;
+}
+
+bool MYODBCDesRecord::setUnsigned( SQLSMALLINT nUnsigned )
+{
+    this->nUnsigned = nUnsigned;
+    return true;
+}
+
+bool MYODBCDesRecord::setUpdatable( SQLSMALLINT nUpdatable )
+{
+    this->nUpdatable = nUpdatable;
+    return true;
+}
+
+SQLINTEGER  MYODBCDesRecord::getAutoUniqueValue()
+{
+    return this->nAutoUniqueValue;
+}
+
+QString     MYODBCDesRecord::getBaseColumnName()
+{
+    return this->stringBaseColumnName;
+}
+
+QString     MYODBCDesRecord::getBaseTableName()
+{
+    return this->stringBaseTableName;
+}
+
+SQLINTEGER  MYODBCDesRecord::getCaseSensitive()
+{
+    return this->nCaseSensitive;
+}
+
+QString     MYODBCDesRecord::getCatalogName()
+{
+    return this->stringCatalogName;
+}
+
+SQLSMALLINT MYODBCDesRecord::getConciseType()
+{
+    return this->nConciseType;
+}
+
+SQLPOINTER  MYODBCDesRecord::getDataPtr()
+{
+    return this->pDataPtr;
+}
+
+SQLSMALLINT MYODBCDesRecord::getDatetimeIntervalCode()
+{
+    return this->nDatetimeIntervalCode;
+}
+
+SQLINTEGER  MYODBCDesRecord::getDatetimeIntervalPrecision()
+{
+    return this->nDatetimeIntervalPrecision;
+}
+
+SQLINTEGER  MYODBCDesRecord::getDisplaySize() 
+{
+    return this->nDisplaySize;
+}
+
+SQLSMALLINT MYODBCDesRecord::getFixedPrecScale()
+{
+    return this->nFixedPrecScale;
+}
+
+SQLINTEGER *MYODBCDesRecord::getIndicatorPtr()
+{
+    return this->pnIndicatorPtr;
+}
+
+QString     MYODBCDesRecord::getLabel()
+{
+    return this->stringLabel;
+}
+
+SQLUINTEGER MYODBCDesRecord::getLength()
+{
+    return this->nLength;
+}
+
+QString     MYODBCDesRecord::getLiteralPrefix()
+{
+    return this->stringLiteralPrefix;
+}
+
+QString     MYODBCDesRecord::getLiteralSuffix()
+{
+    return this->stringLiteralSuffix;
+}
+
+QString     MYODBCDesRecord::getLocalTypeName()
+{
+    return this->stringLocalTypeName;
+}
+
+QString     MYODBCDesRecord::getName()
+{
+    return this->stringName;
+}
+
+SQLSMALLINT MYODBCDesRecord::getNullable()
+{
+    return this->nNullable;
+}
+
+SQLINTEGER  MYODBCDesRecord::getNumPrecRadix()
+{
+    return this->nNumPrecRadix;
+}
+
+SQLINTEGER  MYODBCDesRecord::getOctetLength()
+{
+    return this->nOctetLength;
+}
+
+SQLINTEGER *MYODBCDesRecord::getOctetLengthPtr()
+{
+    return this->pnOctetLengthPtr;
+}
+
+SQLSMALLINT MYODBCDesRecord::getParamterType()
+{
+    return this->nParamterType;
+}
+
+SQLSMALLINT MYODBCDesRecord::getPrecision()
+{
+    return this->nPrecision;
+}
+
+SQLSMALLINT MYODBCDesRecord::getRowver()
+{
+    return this->nRowver;
+}
+
+SQLSMALLINT MYODBCDesRecord::getScale()
+{
+    return this->nScale;
+}
+
+QString     MYODBCDesRecord::getSchemaName()
+{
+    return this->stringSchemaName;
+}
+
+SQLSMALLINT MYODBCDesRecord::getSearchable()
+{
+    return this->nSearchable;
+}
+
+QString     MYODBCDesRecord::getTableName()
+{
+    return this->stringTableName;
+}
+
+SQLSMALLINT MYODBCDesRecord::getType()
+{
+    return this->nType;
+}
+
+QString     MYODBCDesRecord::getTypeName()
+{
+    return this->stringTypeName;
+}
+
+SQLSMALLINT MYODBCDesRecord::getUnnamed()
+{
+    return this->nUnnamed;
+}
+
+SQLSMALLINT MYODBCDesRecord::getUnsigned()
+{
+    return this->nUnsigned;
+}
+
+SQLSMALLINT MYODBCDesRecord::getUpdatable()
+{
+    return this->nUpdatable;
+}
+
+MYODBCDes * MYODBCDesRecord::getDes()
+{
+    return this->pdes;
+}
+
+

Added: MYODBCDes/MYODBCDesLib/MYODBCDesRecord.h
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesRecord.h	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesRecord.h	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,151 @@
+#ifndef MYODBC_DES_RECORD_H
+#define MYODBC_DES_RECORD_H
+
+/*!
+    \brief  Descriptor records represent different things depending
+            upon the type of descriptor;
+    
+            APD - one record for each buffer bound to a paramter marker
+            IPD - one record for each paramter marker
+            ARD - one record for each buffer bound to a column
+            IRD - one record for each column
+            
+            This structure reflects *all* fields given in the ODBC 
+            specification. However; some fields may be calculated or
+            not used when part of a particular descriptor type.
+            
+            In particular; the read-only fields can, in some cases, be 
+            optimized away.
+            
+            All fields are included for completeness and to help make 
+            the code more understandable. Any storage which can be 
+            optimized away would be very minimal so please leave all.
+
+    \sa     MYODBC_DES
+*/
+
+/* forward declare */
+class MYODBCDes;
+
+class MYODBCDesRecord
+{
+public:
+    MYODBCDesRecord( MYODBCDes *pdes );
+    ~MYODBCDesRecord();
+
+    /* setters */
+    virtual SQLRETURN setAutoUniqueValue( SQLINTEGER nAutoUniqueValue );
+    virtual SQLRETURN setBaseColumnName( const QString &stringBaseColumnName );
+    virtual SQLRETURN setBaseTableName( const QString &stringBaseTableName );
+    virtual SQLRETURN setCaseSensitive( SQLINTEGER nCaseSensitive );
+    virtual SQLRETURN setCatalogName( const QString &stringCatalogName );
+    virtual SQLRETURN setConciseType( SQLSMALLINT nConciseType ) = 0;
+    virtual SQLRETURN setDataPtr( SQLPOINTER pDataPtr );
+    virtual SQLRETURN setDatetimeIntervalCode( SQLSMALLINT nDatetimeIntervalCode );
+    virtual SQLRETURN setDatetimeIntervalPrecision( SQLINTEGER nDatetimeIntervalPrecision
);
+    virtual SQLRETURN setDisplaySize( SQLINTEGER nDisplaySize );
+    virtual SQLRETURN setFixedPrecScale( SQLSMALLINT nFixedPrecScale );
+    virtual SQLRETURN setIndicatorPtr( SQLINTEGER *pnIndicatorPtr );
+    virtual SQLRETURN setLabel( const QString &stringLabel );
+    virtual SQLRETURN setLength( SQLUINTEGER nLength );
+    virtual SQLRETURN setLiteralPrefix( const QString &stringLiteralPrefix );
+    virtual SQLRETURN setLiteralSuffix( const QString &stringLiteralSuffix );
+    virtual SQLRETURN setLocalTypeName( const QString &stringLocalTypeName );
+    virtual SQLRETURN setName( const QString &stringName );
+    virtual SQLRETURN setNullable( SQLSMALLINT nNullable );
+    virtual SQLRETURN setNumPrecRadix( SQLINTEGER nNumPrecRadix );
+    virtual SQLRETURN setOctetLength( SQLINTEGER nOctetLength );
+    virtual SQLRETURN setOctetLengthPtr( SQLINTEGER *pnOctetLengthPtr );
+    virtual SQLRETURN setParamterType( SQLSMALLINT nParamterType );
+    virtual SQLRETURN setPrecision( SQLSMALLINT nPrecision );
+    virtual SQLRETURN setRowver( SQLSMALLINT nRowver );
+    virtual SQLRETURN setScale( SQLSMALLINT nScale );
+    virtual SQLRETURN setSchemaName( const QString &stringSchemaName );
+    virtual SQLRETURN setSearchable( SQLSMALLINT nSearchable );
+    virtual SQLRETURN setTableName( const QString &stringTableName );
+    virtual SQLRETURN setType( SQLSMALLINT nType ) = 0;
+    virtual SQLRETURN setTypeName( const QString &stringTypeName );
+    virtual SQLRETURN setUnnamed( SQLSMALLINT nUnnamed );
+    virtual SQLRETURN setUnsigned( SQLSMALLINT nUnsigned );
+    virtual SQLRETURN setUpdatable( SQLSMALLINT nUpdatable );
+
+    /* getters */
+    virtual SQLINTEGER  getAutoUniqueValue();
+    virtual QString     getBaseColumnName();
+    virtual QString     getBaseTableName();
+    virtual SQLINTEGER  getCaseSensitive();
+    virtual QString     getCatalogName();
+    virtual SQLSMALLINT getConciseType();
+    virtual SQLPOINTER  getDataPtr();                      
+    virtual SQLSMALLINT getDatetimeIntervalCode();
+    virtual SQLINTEGER  getDatetimeIntervalPrecision();
+    virtual SQLINTEGER  getDisplaySize();
+    virtual SQLSMALLINT getFixedPrecScale();
+    virtual SQLINTEGER *getIndicatorPtr();
+    virtual QString     getLabel();
+    virtual SQLUINTEGER getLength();
+    virtual QString     getLiteralPrefix();
+    virtual QString     getLiteralSuffix();
+    virtual QString     getLocalTypeName();
+    virtual QString     getName();
+    virtual SQLSMALLINT getNullable();
+    virtual SQLINTEGER  getNumPrecRadix();
+    virtual SQLINTEGER  getOctetLength();
+    virtual SQLINTEGER *getOctetLengthPtr();
+    virtual SQLSMALLINT getParamterType();
+    virtual SQLSMALLINT getPrecision();
+    virtual SQLSMALLINT getRowver();
+    virtual SQLSMALLINT getScale();
+    virtual QString     getSchemaName();
+    virtual SQLSMALLINT getSearchable();
+    virtual QString     getTableName();
+    virtual SQLSMALLINT getType();
+    virtual QString     getTypeName();
+    virtual SQLSMALLINT getUnnamed();
+    virtual SQLSMALLINT getUnsigned();
+    virtual SQLSMALLINT getUpdatable();
+    virtual MYODBCDes * getDes();
+
+protected:
+    MYODBCDes * pdes;                           /* parent & owner */
+
+    /* some of these 'fields' will be calculated and not stored in the future */
+    /* these 'fields' are named as per odbc spec to make xref easier */
+    SQLINTEGER  nAutoUniqueValue;
+    QString     stringBaseColumnName;
+    QString     stringBaseTableName;
+    SQLINTEGER  nCaseSensitive;
+    QString     stringCatalogName;
+    SQLSMALLINT nConciseType;
+    SQLPOINTER  pDataPtr;                      /*!< IF null THEN unbound ELSE bound   
      */
+    SQLSMALLINT nDatetimeIntervalCode;
+    SQLINTEGER  nDatetimeIntervalPrecision;
+    SQLINTEGER  nDisplaySize;                    /*! calculated?     */
+    SQLSMALLINT nFixedPrecScale;
+    SQLINTEGER *pnIndicatorPtr;
+    QString     stringLabel;
+    SQLUINTEGER nLength;
+    QString     stringLiteralPrefix;
+    QString     stringLiteralSuffix;
+    QString     stringLocalTypeName;
+    QString     stringName;
+    SQLSMALLINT nNullable;
+    SQLINTEGER  nNumPrecRadix;
+    SQLINTEGER  nOctetLength;
+    SQLINTEGER *pnOctetLengthPtr;
+    SQLSMALLINT nParamterType;
+    SQLSMALLINT nPrecision;
+    SQLSMALLINT nRowver;
+    SQLSMALLINT nScale;
+    QString     stringSchemaName;
+    SQLSMALLINT nSearchable;
+    QString     stringTableName;
+    SQLSMALLINT nType;
+    QString     stringTypeName;
+    SQLSMALLINT nUnnamed;
+    SQLSMALLINT nUnsigned;
+    SQLSMALLINT nUpdatable;
+};
+
+#endif
+

Deleted: MYODBCDes/MYODBCDesTest/MYODBCDesTest.c
===================================================================
--- MYODBCDes/MYODBCDesTest/MYODBCDesTest.c	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/MYODBCDesTest/MYODBCDesTest.c	2006-01-03 03:47:25 UTC (rev 24)
@@ -1,197 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <MYODBCDes.h>
-
-typedef struct tTEST
-{
-    char *      name;
-    int (*pfunc)();
-} TEST;
-
-/*!
-    \brief  test5
-
-            Ensure that MYODBCDesCount will delete descriptor records
-            as needed.
-*/            
-int test5()
-{
-    MYODBC_RTTI_TYPE    nFakeSTM    = MYODBC_RTTI_STM;
-    SQLHANDLE           hOwner      = &nFakeSTM;
-    MYODBC_DES_PTR      pDes        = MYODBCDesAlloc( hOwner, MYODBC_RTTI_DES_APD );
-    int                 bReturn     = 0;
-    MYODBC_C_ULONGLONG  nItems      = 0;
-
-    if ( !pDes )
-        return 0;
-
-    MYODBCDesCount( pDes, 10, MYODBC_C_FALSE );
-    MYODBCArrayGetCount( pDes->hRecords, &nItems );
-    if ( nItems != 11 )
-        goto test5Exit1;
-
-    MYODBCDesCount( pDes, 0, MYODBC_C_FALSE );
-    MYODBCArrayGetCount( pDes->hRecords, &nItems );
-    if ( nItems != 1 )
-        goto test5Exit1;
-
-    bReturn = 1;
-
-test5Exit1:
-    MYODBCDesFree( pDes );
-
-    return bReturn;
-}
-
-/*!
-    \brief  test4
-
-            Ensure that MYODBCDesCount will add descriptor records
-            as needed.
-*/            
-int test4()
-{
-    MYODBC_RTTI_TYPE    nFakeSTM    = MYODBC_RTTI_STM;
-    SQLHANDLE           hOwner      = &nFakeSTM;
-    MYODBC_DES_PTR      pDes        = MYODBCDesAlloc( hOwner, MYODBC_RTTI_DES_APD );
-    int                 bReturn     = 0;
-    MYODBC_C_ULONGLONG  nItems      = 0;
-
-    if ( !pDes )
-        return 0;
-
-    MYODBCDesCount( pDes, 10, MYODBC_C_FALSE );
-    MYODBCArrayGetCount( pDes->hRecords, &nItems );
-    if ( nItems != 11 )
-        goto test4Exit1;
-
-    bReturn = 1;
-
-test4Exit1:
-    MYODBCDesFree( pDes );
-
-    return bReturn;
-}
-
-/*!
-    \brief  test3
-
-            Catch attempt to allocate descriptor when descriptor type
-            is not compatible with MYODBC_RTTI_DBC handle type.
-*/            
-int test3()
-{
-    MYODBC_RTTI_TYPE    nFakeDBC    = MYODBC_RTTI_DBC;
-    SQLHANDLE           hOwner      = &nFakeDBC;
-    MYODBC_DES_PTR      pDes        = NULL;
-
-    pDes = MYODBCDesAlloc( hOwner, MYODBC_RTTI_DES_APD );
-    if ( pDes )
-    {
-        MYODBCDesFree( pDes );
-        return 0;
-    }
-
-    pDes = MYODBCDesAlloc( hOwner, MYODBC_RTTI_DES_IPD );
-    if ( pDes )
-    {
-        MYODBCDesFree( pDes );
-        return 0;
-    }
-
-    pDes = MYODBCDesAlloc( hOwner, MYODBC_RTTI_DES_ARD );
-    if ( pDes )
-    {
-        MYODBCDesFree( pDes );
-        return 0;
-    }
-
-    pDes = MYODBCDesAlloc( hOwner, MYODBC_RTTI_DES_IRD );
-    if ( pDes )
-    {
-        MYODBCDesFree( pDes );
-        return 0;
-    }
-
-    return 1;
-}
-
-/*!
-    \brief  test2
-
-            Catch attempt to allocate descriptor when descriptor type
-            is not compatible with MYODBC_RTTI_STM handle type.
-*/            
-int test2()
-{
-    MYODBC_RTTI_TYPE    nFakeSTM    = MYODBC_RTTI_STM;
-    SQLHANDLE           hOwner      = &nFakeSTM;
-    MYODBC_DES_PTR      pDes = MYODBCDesAlloc( hOwner, MYODBC_RTTI_DES_UND );
-
-    /* we should be NULL */
-    if ( pDes )
-    {
-        MYODBCDesFree( pDes );
-        return 0;
-    }
-
-    return 1;
-}
-
-/*!
-    \brief  test1
-
-            Allocate descriptor.
-*/            
-int test1()
-{
-    MYODBC_RTTI_TYPE    nFakeDBC    = MYODBC_RTTI_DBC;
-    SQLHANDLE           hOwner      = &nFakeDBC;
-    MYODBC_DES_PTR      pDes = MYODBCDesAlloc( hOwner, MYODBC_RTTI_DES_UND );
-
-    if ( !pDes )
-        return 0;
-
-    MYODBCDesFree( pDes );
-
-    return 1;
-}
-
-/*!
-    \brief  main
-
-            To add a new test simply create a new function in here
-            and then 'register' it by adding another element to the 
-            'tests' array.
-*/
-int main()
-{
-    TEST tests[6]=
-    {
-        { "test1", test1 },
-        { "test2", test2 },
-        { "test3", test3 },
-        { "test4", test4 },
-        { "test5", test5 },
-        { NULL, NULL }
-    };
-    int n;
-
-    for ( n = 0; tests[n].name; n++ )
-    {
-        printf( "%-40s", tests[n].name ); 
-        if ( tests[n].pfunc() )
-            printf( "[  OK  ]\n" );
-        else
-        {
-            printf( "[FAILED]\n" ); 
-            exit( 1 );
-        }
-    }
-
-    return 0;
-}  
-
-

Copied: MYODBCDes/MYODBCDesTest/MYODBCDesTest.cpp (from rev 17,
MYODBCDes/MYODBCDesTest/MYODBCDesTest.c)

Modified: MYODBCDes/include/MYODBCDes.h
===================================================================
--- MYODBCDes/include/MYODBCDes.h	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/include/MYODBCDes.h	2006-01-03 03:47:25 UTC (rev 24)
@@ -49,11 +49,16 @@
 #define MYODBC_DES_H
 
 #include <MYODBCC.h>
-#include <MYODBCArray.h>
-#include <MYODBCList.h>
-#include <MYODBCRtti.h>
+#include <MYODBCDbg.h>
 #include <MYODBCDia.h>
 
+#include <QList>
+#include <QString>
+#include <QStringList>
+#include <QTextStream>
+
+class MYODBCDesRecord;
+
 /*!
     \brief  This is the top-level descriptor struct. It represents a;
             GEN, APD, IPD, ARD, or IRD depending upon what the 
@@ -65,217 +70,129 @@
 
     \sa     MYODBC_DES_REC
 */
-typedef struct tMYODBC_DES
+class MYODBCDes
 {
-    MYODBC_RTTI_TYPE        nTypeID;                /*!< always MYODBC_RTTI_DES       
                 */
-    MYODBC_RTTI_DES_TYPE    nTypeSubID;             /*!< MYODBC_RTTI_DES_UND, APD,
IPD, ARD, or IRD     */
-    SQLHANDLE               hOwner;                 /*!< dbc if explicit else stmt    
                 */  
-    MYODBC_LIST_ITEM_HANDLE hListItemMe;            /*!< our node; may be used in
dbc->descriptors      */
-    MYODBC_DIA_HANDLE       hDia;                   /*!< errors, warnings, etc        
                 */
+    friend class MYODBCDesRecord;
+public:
+    MYODBCDes( SQLHANDLE hOwner );
+    ~MYODBCDes();
 
-    /* header fields  */
-    SQLSMALLINT     desc_alloc_type;
-    SQLUINTEGER     desc_array_size;
-    SQLUSMALLINT *  desc_array_status_ptr;
-    SQLINTEGER *    desc_bind_offset_ptr;
-    SQLINTEGER      desc_bind_type;
-    SQLSMALLINT     desc_count;                     /*!< Highest viable index (-1 if
none).           
+    /* setters */
+    virtual SQLRETURN setArraySize( SQLUINTEGER nArraySize );
+    virtual SQLRETURN setArrayStatusPtr( SQLUSMALLINT *pnArrayStatusPtr );
+    virtual SQLRETURN setBindOffsetPtr( SQLINTEGER *pnBindOffsetPtr );
+    virtual SQLRETURN setBindType( SQLINTEGER nBindType );
+    virtual SQLRETURN setCount( SQLSMALLINT nCount );
+    virtual SQLRETURN setRowsProcessedPtr( SQLUINTEGER *pnRowsProcessedPtr );
+
+    virtual SQLRETURN setAutoUniqueValue( SQLSMALLINT nRecord, SQLINTEGER
nAutoUniqueValue );
+    virtual SQLRETURN setBaseColumnName( SQLSMALLINT nRecord, const QString
&stringBaseColumnName );
+    virtual SQLRETURN setBaseTableName( SQLSMALLINT nRecord, const QString
&stringBaseTableName );
+    virtual SQLRETURN setCaseSensitive( SQLSMALLINT nRecord, SQLINTEGER nCaseSensitive );
+    virtual SQLRETURN setCatalogName( SQLSMALLINT nRecord, const QString
&stringCatalogName );
+    virtual SQLRETURN setConciseType( SQLSMALLINT nRecord, SQLSMALLINT nConciseType );
+    virtual SQLRETURN setDataPtr( SQLSMALLINT nRecord, SQLPOINTER pDataPtr );
+    virtual SQLRETURN setDatetimeIntervalCode( SQLSMALLINT nRecord, SQLSMALLINT
nDatetimeIntervalCode );
+    virtual SQLRETURN setDatetimeIntervalPrecision( SQLSMALLINT nRecord, SQLINTEGER
nDatetimeIntervalPrecision );
+    virtual SQLRETURN setDisplaySize( SQLSMALLINT nRecord, SQLINTEGER nDisplaySize );
+    virtual SQLRETURN setFixedPrecScale( SQLSMALLINT nRecord, SQLSMALLINT nFixedPrecScale
);
+    virtual SQLRETURN setIndicatorPtr( SQLSMALLINT nRecord, SQLINTEGER *pnIndicatorPtr );
+    virtual SQLRETURN setLabel( SQLSMALLINT nRecord, const QString &stringLabel );
+    virtual SQLRETURN setLength( SQLSMALLINT nRecord, SQLUINTEGER nLength );
+    virtual SQLRETURN setLiteralPrefix( SQLSMALLINT nRecord, const QString
&stringLiteralPrefix );
+    virtual SQLRETURN setLiteralSuffix( SQLSMALLINT nRecord, const QString
&stringLiteralSuffix );
+    virtual SQLRETURN setLocalTypeName( SQLSMALLINT nRecord, const QString
&stringLocalTypeName );
+    virtual SQLRETURN setName( SQLSMALLINT nRecord, const QString &stringName );
+    virtual SQLRETURN setNullable( SQLSMALLINT nRecord, SQLSMALLINT nNullable );
+    virtual SQLRETURN setNumPrecRadix( SQLSMALLINT nRecord, SQLINTEGER nNumPrecRadix );
+    virtual SQLRETURN setOctetLength( SQLSMALLINT nRecord, SQLINTEGER nOctetLength );
+    virtual SQLRETURN setOctetLengthPtr( SQLSMALLINT nRecord, SQLINTEGER
*pnOctetLengthPtr );
+    virtual SQLRETURN setParamterType( SQLSMALLINT nRecord, SQLSMALLINT nParamterType );
+    virtual SQLRETURN setPrecision( SQLSMALLINT nRecord, SQLSMALLINT nPrecision );
+    virtual SQLRETURN setRowver( SQLSMALLINT nRecord, SQLSMALLINT nRowver );
+    virtual SQLRETURN setScale( SQLSMALLINT nRecord, SQLSMALLINT nScale );
+    virtual SQLRETURN setSchemaName( SQLSMALLINT nRecord, const QString
&stringSchemaName );
+    virtual SQLRETURN setSearchable( SQLSMALLINT nRecord, SQLSMALLINT nSearchable );
+    virtual SQLRETURN setTableName( SQLSMALLINT nRecord, const QString
&stringTableName );
+    virtual SQLRETURN setType( SQLSMALLINT nRecord, SQLSMALLINT nType ) = 0;
+    virtual SQLRETURN setTypeName( SQLSMALLINT nRecord, const QString &stringTypeName
);
+    virtual SQLRETURN setUnnamed( SQLSMALLINT nRecord, SQLSMALLINT nUnnamed );
+    virtual SQLRETURN setUnsigned( SQLSMALLINT nRecord, SQLSMALLINT nUnsigned );
+    virtual SQLRETURN setUpdatable( SQLSMALLINT nRecord, SQLSMALLINT nUpdatable );
+    
+    /* getters */
+    virtual SQLSMALLINT getAllocType();
+    virtual SQLUINTEGER getArraySize();
+    virtual SQLUSMALLINT *getArrayStatusPtr();
+    virtual SQLINTEGER *getBindOffsetPtr();
+    virtual SQLINTEGER getBindType();
+    virtual SQLSMALLINT getCount();
+    virtual SQLUINTEGER *getRowsProcessedPtr();
+
+    virtual SQLINTEGER  getAutoUniqueValue( SQLSMALLINT nRecord );
+    virtual QString     getBaseColumnName( SQLSMALLINT nRecord );
+    virtual QString     getBaseTableName( SQLSMALLINT nRecord );
+    virtual SQLINTEGER  getCaseSensitive( SQLSMALLINT nRecord );
+    virtual QString     getCatalogName( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getConciseType( SQLSMALLINT nRecord );
+    virtual SQLPOINTER  getDataPtr( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getDatetimeIntervalCode( SQLSMALLINT nRecord );
+    virtual SQLINTEGER  getDatetimeIntervalPrecision( SQLSMALLINT nRecord );
+    virtual SQLINTEGER  getDisplaySize( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getFixedPrecScale( SQLSMALLINT nRecord );
+    virtual SQLINTEGER *getIndicatorPtr( SQLSMALLINT nRecord );
+    virtual QString     getLabel( SQLSMALLINT nRecord );
+    virtual SQLUINTEGER getLength( SQLSMALLINT nRecord );
+    virtual QString     getLiteralPrefix( SQLSMALLINT nRecord );
+    virtual QString     getLiteralSuffix( SQLSMALLINT nRecord );
+    virtual QString     getLocalTypeName( SQLSMALLINT nRecord );
+    virtual QString     getName( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getNullable( SQLSMALLINT nRecord );
+    virtual SQLINTEGER  getNumPrecRadix( SQLSMALLINT nRecord );
+    virtual SQLINTEGER  getOctetLength( SQLSMALLINT nRecord );
+    virtual SQLINTEGER *getOctetLengthPtr( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getParamterType( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getPrecision( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getRowver( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getScale( SQLSMALLINT nRecord );
+    virtual QString     getSchemaName( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getSearchable( SQLSMALLINT nRecord );
+    virtual QString     getTableName( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getType( SQLSMALLINT nRecord );
+    virtual QString     getTypeName( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getUnnamed( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getUnsigned( SQLSMALLINT nRecord );
+    virtual SQLSMALLINT getUpdatable( SQLSMALLINT nRecord );
+
+    SQLHANDLE getOwner();
+    MYODBC_RTTI_DES_TYPE getDesType();
+
+protected:
+    MYODBC_RTTI_DES_TYPE    nTypeSubID;            /*!< MYODBC_RTTI_DES_UND, APD, IPD,
ARD, or IRD     */
+    SQLHANDLE               hOwner;                /*!< dbc if explicit else stmt     
                */  
+    MYODBCDia               dia;                   /*!< errors, warnings, etc         
                */
+
+    SQLSMALLINT     nAllocType;
+    SQLUINTEGER     nArraySize;
+    SQLUSMALLINT *  pnArrayStatusPtr;
+    SQLINTEGER *    pnBindOffsetPtr;
+    SQLINTEGER      nBindType;
+    /* SQLSMALLINT     nCount; */                    /*!< Highest viable index (-1 if
none).           
                                                     The app sees SQL_DESC_COUNT as 1
based but   
                                                     because we have a "hidden" record at
index 0 
                                                     it is, for most of what we do, 0
based.      
                                                     This var is purposefully independent
of      
                                                     records->elements.                
                 */
-    SQLUINTEGER *   desc_rows_processed_ptr;
+    SQLUINTEGER *   pnRowsProcessedPtr;
 
-    MYODBC_ARRAY_HANDLE  hRecords;                  /*!< An array of MYODBC_DES_REC.
We should always
+    QList<MYODBCDesRecord*> listRecords;        /*!< An array of MYODBC_DES_REC.
We should always
                                                     have record at index 0. Index 0 is
used for  
                                                     bookmarks when an ARD desc.          
              */
-    SQLPOINTER pExtra;                              /*!< "driver defined" data can be
attached here     */
+};
 
-    void (*pfuncDesFreeExtra)(void *pDes);          /*!< call-back function to free
mem                 */
-    void (*pfuncDesRecFreeExtra)(void *pRec);       /*!< call-back function to free
mem                 */
++++++++++++++++++++++++++
 
-} MYODBC_DES;
-
 /*!
-    \brief  Descriptor pointer.
-
-            This is for convenience and code clarity.
-*/    
-typedef MYODBC_DES *MYODBC_DES_PTR;
-
-/*!
-    \brief  Descriptor records represent different things depending
-            upon the type of descriptor;
-    
-            APD - one record for each buffer bound to a paramter marker
-            IPD - one record for each paramter marker
-            ARD - one record for each buffer bound to a column
-            IRD - one record for each column
-            
-            This structure reflects *all* fields given in the ODBC 
-            specification. However; some fields may be calculated or
-            not used when part of a particular descriptor type.
-            
-            In particular; the read-only fields can, in some cases, be 
-            optimized away.
-            
-            All fields are included for completeness and to help make 
-            the code more understandable. Any storage which can be 
-            optimized away would be very minimal so please leave all.
-
-    \sa     MYODBC_DES
-*/
-typedef struct tMYODBC_DES_REC
-{
-    MYODBC_DES_PTR  pOwner;
-
-    SQLINTEGER    desc_auto_unique_value;
-    SQLCHAR *     desc_base_column_name;
-    SQLCHAR *     desc_base_table_name;
-    SQLINTEGER    desc_case_sensitive;
-    SQLCHAR *     desc_catalog_name;
-    SQLSMALLINT   desc_concise_type;
-    SQLPOINTER    desc_data_ptr;                      /*!< IF null THEN unbound ELSE
bound          */
-    SQLSMALLINT   desc_datetime_interval_code;
-    SQLINTEGER    desc_datetime_interval_precision;
-    SQLINTEGER    desc_display_size;                    /*! calculated?     */
-    SQLSMALLINT   desc_fixed_prec_scale;
-    SQLINTEGER *  desc_indicator_ptr;
-    SQLCHAR *     desc_label;
-    SQLUINTEGER   desc_length;
-    SQLCHAR *     desc_literal_prefix;
-    SQLCHAR *     desc_literal_suffix;
-    SQLCHAR *     desc_local_type_name;
-    SQLCHAR *     desc_name;
-    SQLSMALLINT   desc_nullable;
-    SQLINTEGER    desc_num_prec_radix;
-    SQLINTEGER    desc_octet_length;
-    SQLINTEGER *  desc_octet_length_ptr;
-    SQLSMALLINT   desc_paramter_type;
-    SQLSMALLINT   desc_precision;
-    SQLSMALLINT   desc_rowver;
-    SQLSMALLINT   desc_scale;
-    SQLCHAR *     desc_schema_name;
-    SQLSMALLINT   desc_searchable;
-    SQLCHAR *     desc_table_name;
-    SQLSMALLINT   desc_type;
-    SQLCHAR *     desc_type_name;
-    SQLSMALLINT   desc_unnamed;
-    SQLSMALLINT   desc_unsigned;
-    SQLSMALLINT   desc_updatable;
-
-    SQLPOINTER    pExtra;                             /*!< any extra data needed by
driver          */
-
-} MYODBC_DES_REC;
-
-/*!
-    \brief  Descriptor record pointer.
-
-            This is for convenience and code clarity.
-*/    
-typedef MYODBC_DES_REC *MYODBC_DES_REC_PTR;
-
-/*!
-    \brief  Allocates a new descriptor.
-
-            Allocates a new descriptor; initializing
-            fields based upon the requested type.
-
-            Descriptors know nothing about the driver
-            code itself - including its handles. 
-            Subsequently the caller will likely want to do
-            some processing to complete this request. For
-            example; add the descriptor to a list of 
-            descriptors in the owner handle.
-
-    \param  hOwner      The ODBC handle which will own the new
-                        descriptor. The type of handle which is
-                        viable depends upon the nDesType. 
-
-                        The handle should correspond to a 
-                        MYODBC_RTTI_TYPE.
-                    
-    \param  nDesType    The descriptor type to create.
-
-    \return MYODBC_DES_PTR
-
-    \retval A pointer to a viable descriptor.
-    \retval NULL if something went wrong.
-    
-    \sa     MYODBCDesFree() 
-            SQLAllocHandle()
-*/
-MYODBC_DES_PTR MYODBCDesAlloc( SQLHANDLE            hOwner, 
-                               MYODBC_RTTI_DES_TYPE nDesType );
-
-/*!
-    \brief  Expands or shrinks list of records.
-            
-            Expands or shrinks list of records while trying to account for some
-            rules stated in the ODBC spec in regard to maintaining the records list.
-
-    \param  pDes        any type of descriptor
-    \param  nCount      the desired value for SQL_DESC_COUNT (0-n), records appended 
-                        or truncated as needed
-    \param  bUnbind     - True  - is ok to truncate records which are bound
-                        - False - never truncate a bound record (in this case num-recs 
-                        could be > count)
-    \return MYODBC_C_BOOL
-
-    \retval MYODBC_C_TRUE   success (its possible to have success but count < 
-                            SQL_DESC_COUNT)
-    \retval MYODBC_C_FALSE  failed
-*/
-MYODBC_C_BOOL MYODBCDesCount( MYODBC_DES_PTR    pDes, 
-                              SQLSMALLINT       nCount, 
-                              MYODBC_C_BOOL     bUnbind );
-
-/*!
-    \brief  Sets the callback function for freeing resources used by 
-            the descriptors 'extra' --- if any.
-
-            By default there is no extra data so nothing is called to 
-            process it. But if the caller sets the extra field then it
-            probably wants to know when it is no longer needed - such as
-            when the descriptor is being freed. 
-
-            For example; this is called (if set) during MYODBCDesFree().
-
-    \param  pDes        A viable MYODBC_DES_PTR.
-    \param  pFunc       Pointer to a function which accepts a
-                        MYODBC_DES_PTR.
-
-    \return void
-
-    \sa     MYODBCDesFree
-            MYODBCDesRecSetFreeExtra
-*/    
-void MYODBCDesSetFreeExtra( MYODBC_DES_PTR pDes, 
-                            void (*pfunc)(void *pDes) );
-
-/*!
-    \brief  Release all resources used by the given descriptor.
-
-            This supports; SQLFreeHandle.
-    
-    \note   Caller should not let application try to explicitly free an 
-            implicit descriptor... such a call is an error. Here we free
-            the descriptor without regard to this because we may be called
-            for cleanup.
-
-            In the case where the descriptor is SQL_DESC_ALLOC_USER; the driver 
-            should disassociate the descriptor from any statements and the owning
-            dbc - then call this.
-
-    \param  pDes     A viable MYODBC_DES_PTR.
-    
-    \sa     MYODBCDesAlloc
-            SQLFreeHandle
-*/
-void MYODBCDesFree( MYODBC_DES_PTR pDes );
-
-/*!
     \brief  Gets length information from the desired descriptor record.
 
             The length is determined by a set of rules which revolve
@@ -332,49 +249,6 @@
                      MYODBC_RTTI_DES_TYPE   nDesType );
 
 
-/*!
-    \brief  Allocate a descriptor record.
-    
-            Allocate a descriptor record. This may include some initialization
-            based upon the type requested.
-
-    \param  nType   Descriptor type.
-
-    \return MYODBC_DES_REC_PTR
-    
-    \sa     MYODBCDesRecFree
-*/    
-MYODBC_DES_REC_PTR MYODBCDesRecAlloc( MYODBC_RTTI_DES_TYPE nType );
-
-/*!
-    \brief  Allocate a descriptor record.
-    
-            Allocate a descriptor record. This may include some initialization
-            based upon the type of the given desc.
-
-            The record is appended the descriptors array of records.
-            
-    \param  pDes     A viable MYODBC_DES_PTR.
-
-    \return MYODBC_DES_REC_PTR
-    
-    \sa     MYODBCDesRecFree                    
-*/    
-MYODBC_DES_REC_PTR MYODBCDesRecAllocExt( MYODBC_DES_PTR pDes );
-
-/*!
-    \brief  Release all resources used by the given record but not
-            the record itself.
-    
-            Free allocated mem in prep for a Free in rec or a 
-            copy (with this as dest).
-
-    \param  pRecord A viable MYODBC_DES_REC_PTR
-
-    \return void
-*/
-void MYODBCDesRecClear( MYODBC_DES_REC_PTR pRecord );
-
 /*! 
     \brief      Sets SQL_DESC_CONCISE_TYPE field of the given 
                 descriptor record.
@@ -444,62 +318,6 @@
                                       SQLSMALLINT       nConciseType );
 
 /*!
-    \brief  Copy one record to another.
-
-            Copy one record to another. Existing string values in destination are
replaced
-            by values in the source using MYODBCCStrDup.
-
-    \param  pRecordSource       A viable MYODBC_DES_REC_PTR.
-    \param  pRecordDestination  A viable MYODBC_DES_REC_PTR.
-
-    \return void
-
-    \sa     MYODBCDesRectClear
-*/
-void MYODBCDesRecCopy( MYODBC_DES_REC_PTR pRecordSource, 
-                       MYODBC_DES_REC_PTR pRecordDestination );
-
-/*!
-    \brief  Sets the callback function for freeing resources used by 
-            the descriptor records 'extra' --- if any.
-
-            By default there is no extra data so nothing is called to 
-            process it. But if the caller sets the extra field then it
-            probably wants to know when it is no longer needed - such as
-            when the record is being freed. 
-
-            For example; this is called (if set) during MYODBCDesRecFree().
-
-    \param  pDes A viable MYODBC_DES_PTR.
-    \param  pFunc       Pointer to a function which accepts a
-                        MYODBC_DES_REC_PTR.
-
-    \return void
-
-    \sa     MYODBCDesRecFree
-            MYODBCDesSetFreeExtra
-*/    
-void MYODBCDesRecSetFreeExtra( MYODBC_DES_PTR pDes, 
-                               void (*pfunc)(void *pRecord) );
-
-/*!
-    \brief  Frees all resources used by record.
-
-            Removes the nRecord from pDess array of records and
-            then frees the resources used by the record including the 
-            record itself.
-
-    \param  pDes A viable MYODBC_DES_PTR.
-    \param  nRecord     0 based
-
-    \return void
-
-    \sa     MYODBCDesRecAllocExt    
-*/
-void MYODBCDesRecFree( MYODBC_DES_PTR   pDes, 
-                       unsigned int     nRecord );
-
-/*!
     \brief  Get desired record.
 
             Get the desired record while accounting for the automatic expansion of 
@@ -596,18 +414,7 @@
 void MYODBCDesRecIrdVarChar( MYODBC_DES_REC_PTR pDesRec, 
                              SQLCHAR *          pszColumnName, 
                              SQLSMALLINT        nNullable );
-/*!
-    \brief  Free all descriptor records (even bookmark at index 0).
-    
-            One reason to call this function is to free memory when the entire descriptor
-            is being freed.
 
-    \param  pDes A viable MYODBC_DES_PTR.
-
-    \return void
-*/
-void MYODBCDesRecsFree( MYODBC_DES_PTR pDes );
-
 /*! 
     \brief      Sets SQL_DESC_TYPE field of the given 
                 descriptor record.
@@ -685,18 +492,6 @@
 SQLRETURN MYODBCDesRecTypeSQL( MYODBC_DES_REC_PTR   pRecord, 
                                SQLSMALLINT          nType );
 
-/*!
-    \brief  Unbounds a record. 
-    
-            This function exists because I have some questions about how to 
-            flag a record as either bound or unbound.
-    
-            If I have it wrong then we can simply change this func.
-    
-    \todo   Possibly optimize this away at some point in the future.
-*/  
-void MYODBCDesRecUnbind( MYODBC_DES_REC_PTR pRecord );
-
 #endif
 
 

Added: MYODBCDes/include/MYODBCDesAPD.h
===================================================================
--- MYODBCDes/include/MYODBCDesAPD.h	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/include/MYODBCDesAPD.h	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,33 @@
+/*! \file   MYODBCDesAPD.h
+    \author Peter Harvey <pharvey@stripped>
+    \brief  This code is used to support Descriptors (IPD, APD, IRD, ARD).
+
+            This is the Application row descriptor (ARD) class.
+*/
+#ifndef MYODBC_DES_APD_H
+#define MYODBC_DES_APD_H
+
+#include "MYODBCDes.h"
+#include "MYODBCResRecordAPD.h"
+
+/*!
+    \brief  
+    \sa     
+*/
+class MYODBCDesAPD
+{
+    friend class MYODBCDesRecordAPD;
+public:
+    MYODBCDesAPD( SQLHANDLE hOwner );
+    ~MYODBCDesAPD();
+
+    /* setters */
+    SQLRETURN setRowsProcessedPtr( SQLUINTEGER *pnRowsProcessedPtr );
+
+    /* getters */
+    SQLUINTEGER *getRowsProcessedPtr();
+};
+
+#endif
+
+

Added: MYODBCDes/include/MYODBCDesARD.h
===================================================================
--- MYODBCDes/include/MYODBCDesARD.h	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/include/MYODBCDesARD.h	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,33 @@
+/*! \file   MYODBCDesARD.h
+    \author Peter Harvey <pharvey@stripped>
+    \brief  This code is used to support Descriptors (IPD, APD, IRD, ARD).
+
+            This is the Application row descriptor (ARD) class.
+*/
+#ifndef MYODBC_DES_ARD_H
+#define MYODBC_DES_ARD_H
+
+#include "MYODBCDes.h"
+#include "MYODBCResRecordARD.h"
+
+/*!
+    \brief  
+    \sa     
+*/
+class MYODBCDesARD
+{
+    friend class MYODBCDesRecordARD;
+public:
+    MYODBCDesARD( SQLHANDLE hOwner );
+    ~MYODBCDesARD();
+
+    /* setters */
+    SQLRETURN setRowsProcessedPtr( SQLUINTEGER *pnRowsProcessedPtr );
+
+    /* getters */
+    SQLUINTEGER *getRowsProcessedPtr();
+};
+
+#endif
+
+

Added: MYODBCDes/include/MYODBCDesIPD.h
===================================================================
--- MYODBCDes/include/MYODBCDesIPD.h	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/include/MYODBCDesIPD.h	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,37 @@
+/*! \file   MYODBCDesIPD.h
+    \author Peter Harvey <pharvey@stripped>
+    \brief  This code is used to support Descriptors (IPD, IPD, IPD, ARD).
+
+            This is the Application row descriptor (ARD) class.
+*/
+#ifndef MYODBC_DES_IPD_H
+#define MYODBC_DES_IPD_H
+
+#include "MYODBCDes.h"
+#include "MYODBCResRecordIPD.h"
+
+/*!
+    \brief  
+    \sa     
+*/
+class MYODBCDesIPD
+{
+    friend class MYODBCDesRecordIPD;
+public:
+    MYODBCDesIPD( SQLHANDLE hOwner );
+    ~MYODBCDesIPD();
+
+    /* setters */
+    SQLRETURN setArraySize( SQLUINTEGER nArraySize );
+    SQLRETURN setBindOffsetPtr( SQLINTEGER *pnBindOffsetPtr );
+    SQLRETURN setBindType( SQLINTEGER nBindType );
+
+    /* getters */
+    SQLUINTEGER getArraySize();
+    SQLINTEGER *getBindOffsetPtr();
+    SQLINTEGER getBindType();
+};
+
+#endif
+
+

Added: MYODBCDes/include/MYODBCDesIRD.h
===================================================================
--- MYODBCDes/include/MYODBCDesIRD.h	2005-12-29 21:14:40 UTC (rev 23)
+++ MYODBCDes/include/MYODBCDesIRD.h	2006-01-03 03:47:25 UTC (rev 24)
@@ -0,0 +1,37 @@
+/*! \file   MYODBCDesIRD.h
+    \author Peter Harvey <pharvey@stripped>
+    \brief  This code is used to support Descriptors (IPD, IRD, IRD, ARD).
+
+            This is the Application row descriptor (ARD) class.
+*/
+#ifndef MYODBC_DES_IRD_H
+#define MYODBC_DES_IRD_H
+
+#include "MYODBCDes.h"
+#include "MYODBCResRecordIRD.h"
+
+/*!
+    \brief  
+    \sa     
+*/
+class MYODBCDesIRD
+{
+    friend class MYODBCDesRecordIRD;
+public:
+    MYODBCDesIRD( SQLHANDLE hOwner );
+    ~MYODBCDesIRD();
+
+    /* setters */
+    SQLRETURN setArraySize( SQLUINTEGER nArraySize );
+    SQLRETURN setBindOffsetPtr( SQLINTEGER *pnBindOffsetPtr );
+    SQLRETURN setBindType( SQLINTEGER nBindType );
+
+    /* getters */
+    SQLUINTEGER getArraySize();
+    SQLINTEGER *getBindOffsetPtr();
+    SQLINTEGER getBindType();
+};
+
+#endif
+
+

Modified: root.pro
===================================================================
--- root.pro	2005-12-29 21:14:40 UTC (rev 23)
+++ root.pro	2006-01-03 03:47:25 UTC (rev 24)
@@ -50,8 +50,8 @@
 		MYODBCTst \
 		MYODBCIns \
 #		MYODBCSetup \
-		MYODBCDia
-#		MYODBCDes \
+		MYODBCDia \
+		MYODBCDes
 #        	MYODBCRes \
 #		MYODBCDrv \
 #                MYODBCInstaller \

Thread
Connector/ODBC 5 commit: r24 - / MYODBCDbg/MYODBCDbgLib MYODBCDbg/include MYODBCDes MYODBCDes/MYODBCDesLib MYODBCDes/MYODBCDesTest MYODBCDes/includepharvey3 Jan