List:Commits« Previous MessageNext Message »
From:pharvey Date:January 27 2006 4:30am
Subject:Connector/ODBC 5 commit: r49 - / MYODBCAtt MYODBCAtt/MYODBCAttLib MYODBCAtt/MYODBCAttTest MYODBCAtt/include MYODBCDes/MYODBCDesLib
View as plain text  
Modified:
   MYODBCAtt/MYODBCAtt.pro
   MYODBCAtt/MYODBCAttLib/MYODBCAttLib.pro
   MYODBCAtt/MYODBCAttLib/MYODBCAttLib.vpj
   MYODBCAtt/MYODBCAttLib/MYODBCAttStatement.cpp
   MYODBCAtt/MYODBCAttTest/MYODBCAttTest.cpp
   MYODBCAtt/MYODBCAttTest/MYODBCAttTest.pro
   MYODBCAtt/include/MYODBCAttStatement.h
   MYODBCDes/MYODBCDesLib/MYODBCDesRec.cpp
   connector-odbc.vpw
   root.pro
Log:
UNICODE:
- broken attributes into own class to make it usable within classes which have no
understanding of statement handle
- statement attributes are validated in new class
- statement descriptors are now in statement attributes

Modified: MYODBCAtt/MYODBCAtt.pro
===================================================================
--- MYODBCAtt/MYODBCAtt.pro	2006-01-21 01:51:11 UTC (rev 48)
+++ MYODBCAtt/MYODBCAtt.pro	2006-01-27 04:30:56 UTC (rev 49)
@@ -1,5 +1,5 @@
 TEMPLATE        = subdirs
 SUBDIRS		= \
-		MYODBCResLib \
-		MYODBCResTest
+		MYODBCAttLib \
+		MYODBCAttTest
 

Modified: MYODBCAtt/MYODBCAttLib/MYODBCAttLib.pro
===================================================================
--- MYODBCAtt/MYODBCAttLib/MYODBCAttLib.pro	2006-01-21 01:51:11 UTC (rev 48)
+++ MYODBCAtt/MYODBCAttLib/MYODBCAttLib.pro	2006-01-27 04:30:56 UTC (rev 49)
@@ -2,7 +2,7 @@
 # COMMON
 # #########################################################
 TEMPLATE	= lib
-TARGET		= MYODBCRes
+TARGET		= MYODBCAtt
 DESTDIR		= ../../lib
 include( ../../common.pri )
 include( ../../config.pri )
@@ -36,13 +36,9 @@
 # FILES
 # #########################################################
 HEADERS		= \
-		../include/MYODBCRes.h \
-		../include/MYODBCResDriver.h \
-		../include/MYODBCResServer.h \
-		MYODBCResInternal.h
+		../include/MYODBCAttStatement.h \
+		MYODBCAttInternal.h
 
 SOURCES		= \
-		MYODBCRes.cpp \
-		MYODBCResDriver.cpp \
-		MYODBCResServer.cpp
+		MYODBCAttStatement.cpp
 

Modified: MYODBCAtt/MYODBCAttLib/MYODBCAttLib.vpj
===================================================================
--- MYODBCAtt/MYODBCAttLib/MYODBCAttLib.vpj	2006-01-21 01:51:11 UTC (rev 48)
+++ MYODBCAtt/MYODBCAttLib/MYODBCAttLib.vpj	2006-01-27 04:30:56 UTC (rev 49)
@@ -22,7 +22,7 @@
 				CaptureOutputWith="ProcessBuffer"
 				SaveOption="SaveWorkspaceFiles"
 				RunFromDir="%rw">
-				<Exec/>
+				<Exec CmdLine="make"/>
 			</Target>
 			<Target
 				Name="Rebuild"

Modified: MYODBCAtt/MYODBCAttLib/MYODBCAttStatement.cpp
===================================================================
--- MYODBCAtt/MYODBCAttLib/MYODBCAttStatement.cpp	2006-01-21 01:51:11 UTC (rev 48)
+++ MYODBCAtt/MYODBCAttLib/MYODBCAttStatement.cpp	2006-01-27 04:30:56 UTC (rev 49)
@@ -13,17 +13,33 @@
     pAppRowDesc         = pAppRowDescOrig   = new MYODBCDesARD( hStm );
     nAsyncEnable        = SQL_ASYNC_ENABLE_OFF;
     nConcurrency        = SQL_CONCUR_READ_ONLY;
-    nCursorScrollable   = SQL_FETCH_NEXT;
+    nCursorScrollable   = SQL_NONSCROLLABLE;
     nCursorSensitivity  = SQL_UNSPECIFIED;
     nCursorType         = SQL_CURSOR_FORWARD_ONLY;
+    nEnableAutoIPD      = SQL_FALSE;
+    pFetchBookmarkPtr   = NULL;
+    pImpParamDesc       = new MYODBCDesIPD( hStm );
+    pImpRowDesc         = new MYODBCDesIRD( hStm );
+    nKeysetSize         = 0;
+    nMaxLength          = 0;
+    nMaxRows            = 0;
+    nMetadataID         = SQL_FALSE;
+    nNoscan             = SQL_NOSCAN_OFF;
+    nQueryTimeout       = 0;
+    nRetrieveData       = SQL_RD_ON;
+    nRowNumber          = 0;
+    nSimulateCursor     = SQL_SC_TRY_UNIQUE;
+    nUseBookmarks       = SQL_UB_OFF;
 
     MYODBCDbgReturn2();
 }
 
-void MYODBCAttStatement::MYODBCAttStatement()
+MYODBCAttStatement::~MYODBCAttStatement()
 {
     MYODBCDbgEnter();
 
+    delete pImpParamDesc;
+    delete pImpRowDesc;
     delete pAppParamDescOrig;
     delete pAppRowDescOrig;
 
@@ -34,7 +50,7 @@
 {
     MYODBCDbgEnter();
 
-    if ( pdes == SQL_NULL_DESC )
+    if ( pdes == SQL_NULL_HDESC )
         pAppParamDesc = pAppParamDescOrig;
     else
     {
@@ -50,7 +66,7 @@
 {
     MYODBCDbgEnter();
 
-    if ( pdes == SQL_NULL_DESC )
+    if ( pdes == SQL_NULL_HDESC )
         pAppRowDesc = pAppRowDescOrig;
     else
     {
@@ -66,6 +82,16 @@
 {
     MYODBCDbgEnter();
 
+    switch ( nAsyncEnable )
+    {
+        case SQL_ASYNC_ENABLE_OFF:
+        case SQL_ASYNC_ENABLE_ON:
+//            this->nAsyncEnable = nAsyncEnable;
+            break;
+        default:
+            MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY092, 0, NULL ) );
+    }
+
     MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HYC00, 0, NULL ) );
 }
 
@@ -102,8 +128,6 @@
         case SQL_NONSCROLLABLE:
             nCursorType = SQL_CURSOR_FORWARD_ONLY;
             break;
-        case SQL_FETCH_NEXT:
-            break;
         case SQL_SCROLLABLE:
             nCursorType = SQL_CURSOR_STATIC; /*! \todo see odbc spec about this rule and
improve */
             break;
@@ -171,6 +195,8 @@
             MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY092, 0, NULL ) );
     }
 
+    this->nCursorType = nCursorType;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -178,6 +204,17 @@
 {
     MYODBCDbgEnter();
 
+    switch ( nEnableAutoIPD )
+    {
+        case SQL_TRUE:
+        case SQL_FALSE:
+            break;
+        default:
+            MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY024, 0, NULL ) );
+    }
+
+    this->nEnableAutoIPD = nEnableAutoIPD;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -185,6 +222,8 @@
 {
     MYODBCDbgEnter();
 
+    this->pFetchBookmarkPtr = pFetchBookmarkPtr;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -192,6 +231,8 @@
 {
     MYODBCDbgEnter();
 
+    this->nKeysetSize = nKeysetSize;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -199,6 +240,8 @@
 {
     MYODBCDbgEnter();
 
+    this->nMaxLength = nMaxLength;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -206,6 +249,8 @@
 {
     MYODBCDbgEnter();
 
+    this->nMaxRows = nMaxRows;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -213,6 +258,17 @@
 {
     MYODBCDbgEnter();
 
+    switch ( nMetadataID )
+    {
+        case SQL_TRUE:
+        case SQL_FALSE:
+            break;
+        default:
+            MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY024, 0, NULL ) );
+    }
+
+    this->nMetadataID = nMetadataID;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -220,55 +276,68 @@
 {
     MYODBCDbgEnter();
 
+    switch ( nNoscan )
+    {
+        case SQL_NOSCAN_OFF:
+        case SQL_NOSCAN_ON:
+            break;
+        default:
+            MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY024, 0, NULL ) );
+    }
+
+    this->nNoscan = nNoscan;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
-SQLRETURN MYODBCAttStatement::setParamBindOffsetPtr( SQLUINTEGER *pnParamBindOffsetPtr )
+SQLRETURN MYODBCAttStatement::setParamBindOffsetPtr( SQLINTEGER *pnParamBindOffsetPtr )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pAppParamDesc->setBindOffsetPtr( pnParamBindOffsetPtr ) );
 }
 
 SQLRETURN MYODBCAttStatement::setParamBindType( SQLUINTEGER nParamBindType )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pAppParamDesc->setBindType( nParamBindType ) );
 }
 
 SQLRETURN MYODBCAttStatement::setParamOperationPtr( SQLUSMALLINT *pnParamOperationPtr )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pAppParamDesc->setArrayStatusPtr( pnParamOperationPtr ) );
 }
 
 SQLRETURN MYODBCAttStatement::setParamStatusPtr( SQLUSMALLINT *pnParamStatusPtr )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pImpParamDesc->setArrayStatusPtr( pnParamStatusPtr ) );
 }
 
 SQLRETURN MYODBCAttStatement::setParamsProcessedPtr( SQLUINTEGER *pnParamsProcessedPtr )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pImpParamDesc->setRowsProcessedPtr( pnParamsProcessedPtr ) );
 }
 
 SQLRETURN MYODBCAttStatement::setParamsetSize( SQLUINTEGER nParamsetSize )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pAppParamDesc->setArraySize( nParamsetSize ) );
 }
 
 SQLRETURN MYODBCAttStatement::setQueryTimeout( SQLUINTEGER nQueryTimeout )
 {
     MYODBCDbgEnter();
 
+    this->nQueryTimeout = nQueryTimeout;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -276,6 +345,17 @@
 {
     MYODBCDbgEnter();
 
+    switch ( nRetrieveData )
+    {
+        case SQL_RD_ON:
+        case SQL_RD_OFF:
+            break;
+        default:
+            MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY024, 0, NULL ) );
+    }
+
+    this->nRetrieveData = nRetrieveData;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -283,27 +363,29 @@
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pAppRowDesc->setArraySize( nRowArraySize ) );
 }
 
-SQLRETURN MYODBCAttStatement::setRowBindOffsetPtr( SQLUINTEGER *pnRowBindOffsetPtr )
+SQLRETURN MYODBCAttStatement::setRowBindOffsetPtr( SQLINTEGER *pnRowBindOffsetPtr )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pAppRowDesc->setBindOffsetPtr( pnRowBindOffsetPtr ) );
 }
 
 SQLRETURN MYODBCAttStatement::setRowBindType( SQLUINTEGER nRowBindType )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pAppRowDesc->setBindType( nRowBindType ) );
 }
 
 SQLRETURN MYODBCAttStatement::setRowNumber( SQLUINTEGER nRowNumber )
 {
     MYODBCDbgEnter();
 
+    this->nRowNumber = nRowNumber;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -311,27 +393,39 @@
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pAppRowDesc->setArrayStatusPtr( pnRowOperationPtr ) );
 }
 
 SQLRETURN MYODBCAttStatement::setRowStatusPtr( SQLUSMALLINT *pnRowStatusPtr )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pImpRowDesc->setArrayStatusPtr( pnRowStatusPtr ) );
 }
 
 SQLRETURN MYODBCAttStatement::setRowsFetchedPtr( SQLUINTEGER *pnRowsFetchedPtr )
 {
     MYODBCDbgEnter();
 
-    MYODBCDbgReturn( SQL_SUCCESS );
+    MYODBCDbgReturn( pImpRowDesc->setRowsProcessedPtr( pnRowsFetchedPtr ) );
 }
 
 SQLRETURN MYODBCAttStatement::setSimulateCursor( SQLUINTEGER nSimulateCursor )
 {
     MYODBCDbgEnter();
 
+    switch ( nSimulateCursor )
+    {
+        case SQL_SC_NON_UNIQUE:
+        case SQL_SC_TRY_UNIQUE:
+        case SQL_SC_UNIQUE:
+            break;
+        default:
+            MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY024, 0, NULL ) );
+    }
+
+    this->nSimulateCursor = nSimulateCursor;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -339,6 +433,17 @@
 {
     MYODBCDbgEnter();
 
+    switch ( nUseBookmarks )
+    {
+        case SQL_UB_OFF:
+        case SQL_UB_VARIABLE:
+            break;
+        default:
+            MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY024, 0, NULL ) );
+    }
+
+    this->nUseBookmarks = nUseBookmarks;
+
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
@@ -483,7 +588,7 @@
     MYODBCDbgReturn3( "%d", nNoscan );
 }
 
-SQLUINTEGER *MYODBCAttStatement::getParamBindOffsetPtr()
+SQLINTEGER *MYODBCAttStatement::getParamBindOffsetPtr()
 {
     MYODBCDbgEnter();
 
@@ -546,7 +651,7 @@
     MYODBCDbgReturn3( "%d", pAppRowDesc->getArraySize() );
 }
 
-SQLUINTEGER *MYODBCAttStatement::getRowBindOffsetPtr()
+SQLINTEGER *MYODBCAttStatement::getRowBindOffsetPtr()
 {
     MYODBCDbgEnter();
 

Modified: MYODBCAtt/MYODBCAttTest/MYODBCAttTest.cpp
===================================================================
--- MYODBCAtt/MYODBCAttTest/MYODBCAttTest.cpp	2006-01-21 01:51:11 UTC (rev 48)
+++ MYODBCAtt/MYODBCAttTest/MYODBCAttTest.cpp	2006-01-27 04:30:56 UTC (rev 49)
@@ -1,34 +1,33 @@
 /*! 
-    \file     MYODBCResTest.c
+    \file     MYODBCAttTest.c
     \author   Peter Harvey <pharvey@stripped>
               Copyright MySQL AB 2004-2005, Released under GPL.
     \version  Connector/ODBC v5
     \date     2005          
     
-    \brief    This code is used to test MYODBCRes.
+    \brief    This code is used to test MYODBCAtt.
 */
 
 #include <QtTest/QtTest>
 #include <QString>
 #include <QFile>
-#include <MYODBCRes.h>
-#include <MYODBCResDriver.h>
+#include <MYODBCAttStatement.h>
 
-class MYODBCResTest : public QObject
+class MYODBCAttTest : public QObject
 {
     Q_OBJECT
 public:
-    MYODBCResTest();
-    ~MYODBCResTest();
+    MYODBCAttTest();
+    ~MYODBCAttTest();
     QFile fileDebugOut;
 
 private slots:
-    void driver();
+    void statement();
 };
 
-MYODBCResTest::MYODBCResTest()
+MYODBCAttTest::MYODBCAttTest()
 {
-    fileDebugOut.setFileName( "MYODBCResTest.txt" );
+    fileDebugOut.setFileName( "MYODBCAttTest.txt" );
     if ( fileDebugOut.open( QFile::WriteOnly | QFile::Truncate ) ) 
     {
         MYODBCDbgInit( &fileDebugOut );
@@ -39,159 +38,30 @@
     }
 }
 
-MYODBCResTest::~MYODBCResTest()
+MYODBCAttTest::~MYODBCAttTest()
 {
     MYODBCDbgFini();
     fileDebugOut.close();
 }
 
-/* imitates a SQLStatistics call */
-void MYODBCResTest::driver()
+/* some very simle tests for a statements attributes */
+void MYODBCAttTest::statement()
 {
-    MYODBCDia *     pdia        = new MYODBCDia();
-    MYODBCDes *     pdes        = new MYODBCDesIRD( (SQLHANDLE)1 );
-    MYODBCRes *     pres        = new MYODBCResDriver( pdia, pdes, (MYSQL *)1 );
-    uint            nColumns    = 0;
-    qulonglong      nRows       = 0;
-    qulonglong      nRow        = 0;
-    QVariant        variantData;
+    MYODBCDia *             pdia = new MYODBCDia();
+    MYODBCAttStatement *    patt = new MYODBCAttStatement( (SQLHANDLE)1, pdia );
 
-    /* its a driver resultset so we must set the IRD manually */
-    pdes->setCount( 13 );
-    pdes->setName( 0, "bookmark" );
-    pdes->setType( 0, SQL_INTEGER );
-    pdes->setName( 1, "TABLE_CAT" );
-    pdes->setType( 1, SQL_VARCHAR );
-    pdes->setName( 2, "TABLE_SCHEM" );
-    pdes->setType( 2, SQL_VARCHAR );
-    pdes->setName( 3, "TABLE_NAME" );
-    pdes->setType( 3, SQL_VARCHAR );
-    pdes->setName( 4, "NON_UNIQUE" );
-    pdes->setType( 4, SQL_SMALLINT );
-    pdes->setName( 5, "INDEX_QUALIFIER" );
-    pdes->setType( 5, SQL_VARCHAR );
-    pdes->setName( 6, "INDEX_NAME" );
-    pdes->setType( 6, SQL_VARCHAR );
-    pdes->setName( 7, "TYPE" );
-    pdes->setType( 7, SQL_SMALLINT );
-    pdes->setName( 8, "ORDINAL_POSITION" );
-    pdes->setType( 8, SQL_SMALLINT );
-    pdes->setName( 9, "COLUMN_NAME" );
-    pdes->setType( 9, SQL_VARCHAR );
-    pdes->setName( 10, "ASC_OR_DESC" );
-    pdes->setType( 10, SQL_CHAR );
-    pdes->setName( 11, "CARDINALITY" );
-    pdes->setType( 11, SQL_INTEGER );
-    pdes->setName( 12, "PAGES" );
-    pdes->setType( 12, SQL_INTEGER );
-    pdes->setName( 13, "FILTER_CONDITION" );
-    pdes->setType( 13, SQL_VARCHAR );
+    QCOMPARE( patt->getCursorType(), SQL_CURSOR_FORWARD_ONLY );
 
-    pres->getColumns( &nColumns );
-    QCOMPARE( (int)nColumns, 13 );
+    patt->setCursorType( SQL_CURSOR_KEYSET_DRIVEN );
+    QCOMPARE( patt->getCursorType(), SQL_CURSOR_KEYSET_DRIVEN );
 
-    /* append some records */
-    QCOMPARE( pres->isValidRow(), false );
-    pres->doAppend();
-    QCOMPARE( pres->isValidRow(), true );
-
-    pres->setData( 1, "1" );
-    pres->setData( 2, "MyTableSchem" );
-    pres->setData( 3, "MyTableName" );
-    pres->setData( 4, SQL_TRUE );
-    pres->setData( 9, "MyColumnName" );
-    pres->getRow( &nRow );
-    QCOMPARE( (int)nRow, 1 );
-
-    pres->doAppend();
-    pres->setData( 1, "2" );
-    pres->setData( 2, "MyTableSchem" );
-    pres->setData( 3, "MyTableName" );
-    pres->setData( 4, SQL_FALSE );
-    pres->setData( 9, "MyColumnName" );
-    pres->getRow( &nRow );
-    QCOMPARE( (int)nRow, 2 );
-
-    pres->doAppend();
-    pres->setData( 1, "3" );
-    pres->setData( 2, "MyTableSchem" );
-    pres->setData( 3, "MyTableName" );
-    pres->setData( 4, SQL_TRUE );
-    pres->setData( 9, "MyColumnName" );
-    pres->getRow( &nRow );
-    QCOMPARE( (int)nRow, 3 );
-    pres->getRows( &nRows );
-    QCOMPARE( (int)nRows, 3 );
-
-    /* doFirst(), doNext() */
-    pres->doFirst();
-    pres->getData( 1, variantData );
-    QCOMPARE( 1, variantData.toInt() );
-
-    pres->doNext();
-    pres->getData( 1, variantData );
-    QCOMPARE( 2, variantData.toInt() );
-
-    pres->doNext();
-    pres->getData( 1, variantData );
-    QCOMPARE( 3, variantData.toInt() );
-    QCOMPARE( pres->isValidRow(), true );
-
-    pres->doNext();
-    QCOMPARE( pres->isValidRow(), false );
-
-    pres->doNext();
-    pres->getData( 1, variantData );
-    QCOMPARE( 1, variantData.toInt() );
-
-    /* doLast(), doPrev() */
-    pres->doLast();
-    pres->getData( 1, variantData );
-    QCOMPARE( 3, variantData.toInt() );
-
-    pres->doPrev();
-    pres->getData( 1, variantData );
-    QCOMPARE( 2, variantData.toInt() );
-
-    pres->doPrev();
-    pres->getData( 1, variantData );
-    QCOMPARE( 1, variantData.toInt() );
-    QCOMPARE( pres->isValidRow(), true );
-
-    pres->doPrev();
-    QCOMPARE( pres->isValidRow(), false );
-
-    pres->doPrev();
-    pres->getData( 1, variantData );
-    QCOMPARE( 3, variantData.toInt() );
-
-    /* doSkip() */
-    pres->doFirst();
-    pres->doSkip( 2 );
-    pres->getData( 1, variantData );
-    pres->getRow( &nRow );
-    QCOMPARE( (int)nRow, 3 );
-    QCOMPARE( 3, variantData.toInt() );
-
-    pres->doSkip( 1 );
-    QCOMPARE( pres->isValidRow(), false );
-
-    pres->doLast();
-    pres->doSkip( -2 );
-    pres->getData( 1, variantData );
-    QCOMPARE( 1, variantData.toInt() );
-
-    pres->doSkip( -1 );
-    QCOMPARE( pres->isValidRow(), false );
-
     /* fini */
-    delete pres;
-    delete pdes;
+    delete patt;
     delete pdia;
 }
 
-QTEST_MAIN( MYODBCResTest )
-#include "MYODBCResTest.moc"
+QTEST_MAIN( MYODBCAttTest )
+#include "MYODBCAttTest.moc"
 
 
 

Modified: MYODBCAtt/MYODBCAttTest/MYODBCAttTest.pro
===================================================================
--- MYODBCAtt/MYODBCAttTest/MYODBCAttTest.pro	2006-01-21 01:51:11 UTC (rev 48)
+++ MYODBCAtt/MYODBCAttTest/MYODBCAttTest.pro	2006-01-27 04:30:56 UTC (rev 49)
@@ -2,7 +2,7 @@
 # COMMON
 # #########################################################
 TEMPLATE	= app
-TARGET          = MYODBCResTest
+TARGET          = MYODBCAttTest
 DESTDIR		= ../../bin
 include( ../../common.pri )
 include( ../../config.pri )
@@ -15,7 +15,7 @@
 INCLUDEPATH	+= ../../MYODBCDes/include
 INCLUDEPATH	+= ../include
 LIBS		+= -L../../lib
-LIBS		+= -lMYODBCRes
+LIBS		+= -lMYODBCAtt
 LIBS		+= -lMYODBCDes 
 LIBS            += -lMYODBCDia 
 LIBS            += -lMYODBCDbg
@@ -37,5 +37,5 @@
 HEADERS		=  
 
 SOURCES		= \
-		MYODBCResTest.cpp
+		MYODBCAttTest.cpp
 

Modified: MYODBCAtt/include/MYODBCAttStatement.h
===================================================================
--- MYODBCAtt/include/MYODBCAttStatement.h	2006-01-21 01:51:11 UTC (rev 48)
+++ MYODBCAtt/include/MYODBCAttStatement.h	2006-01-27 04:30:56 UTC (rev 49)
@@ -4,6 +4,7 @@
 #include <MYODBCC.h>
 #include <MYODBCDbg.h>
 #include <MYODBCDia.h>
+#include <MYODBCDes.h>
 
 #include <QList>
 #include <QString>
@@ -14,7 +15,7 @@
 {
 public:
     MYODBCAttStatement( SQLHANDLE hStm, MYODBCDia *pdia );
-    virtual void ~MYODBCAttStatement();
+    virtual ~MYODBCAttStatement();
 
     virtual SQLRETURN setAppParamDesc( MYODBCDes *pdes );                          
/*!< SQL_ATTR_APP_PARAM_DESC                                            */
     virtual SQLRETURN setAppRowDesc( MYODBCDes *pdes );                            
/*!< SQL_ATTR_APP_ROW_DESC                                              */       
@@ -30,7 +31,7 @@
     virtual SQLRETURN setMaxRows( SQLUINTEGER nMaxRows );                          
/*!< SQL_ATTR_MAX_ROWS                                                  */
     virtual SQLRETURN setMetadataID( SQLUINTEGER nMetadataID );                    
/*!< SQL_ATTR_METADATA_ID                                               */
     virtual SQLRETURN setNoscan( SQLUINTEGER nNoscan );                            
/*!< SQL_ATTR_NOSCAN                                                    */
-    virtual SQLRETURN setParamBindOffsetPtr( SQLUINTEGER *pnParamBindOffsetPtr );  
/*!< SQL_ATTR_PARAM_BIND_OFFSET_PTR = APD->SQL_DESC_BIND_OFFSET_PTR     */
+    virtual SQLRETURN setParamBindOffsetPtr( SQLINTEGER *pnParamBindOffsetPtr );   
/*!< SQL_ATTR_PARAM_BIND_OFFSET_PTR = APD->SQL_DESC_BIND_OFFSET_PTR     */
     virtual SQLRETURN setParamBindType( SQLUINTEGER nParamBindType );              
/*!< SQL_ATTR_PARAM_BIND_TYPE = APD->SQL_DESC_ BIND_TYPE                */
     virtual SQLRETURN setParamOperationPtr( SQLUSMALLINT *pnParamOperationPtr );   
/*!< SQL_ATTR_PARAM_OPERATION_PTR = APD->SQL_DESC_ARRAY_STATUS_PTR      */
     virtual SQLRETURN setParamStatusPtr( SQLUSMALLINT *pnParamStatusPtr );         
/*!< SQL_ATTR_PARAM_STATUS_PTR = IPD->SQL_DESC_ARRAY_STATUS_PTR         */
@@ -39,7 +40,7 @@
     virtual SQLRETURN setQueryTimeout( SQLUINTEGER nQueryTimeout );                
/*!< SQL_ATTR_QUERY_TIMEOUT                                             */
     virtual SQLRETURN setRetrieveData( SQLUINTEGER nRetrieveData );                
/*!< SQL_ATTR_RETRIEVE_DATA                                             */
     virtual SQLRETURN setRowArraySize( SQLUINTEGER nRowArraySize );                
/*!< SQL_ATTR_ROW_ARRAY_SIZE = ARD->SQL_DESC_ARRAY_SIZE                 */
-    virtual SQLRETURN setRowBindOffsetPtr( SQLUINTEGER *pnRowBindOffsetPtr );      
/*!< SQL_ATTR_ROW_BIND_OFFSET_PTR = ARD->SQL_DESC_BIND_OFFSET_PTR       */
+    virtual SQLRETURN setRowBindOffsetPtr( SQLINTEGER *pnRowBindOffsetPtr );       
/*!< SQL_ATTR_ROW_BIND_OFFSET_PTR = ARD->SQL_DESC_BIND_OFFSET_PTR       */
     virtual SQLRETURN setRowBindType( SQLUINTEGER nRowBindType );                  
/*!< SQL_ATTR_ROW_BIND_TYPE = ARD->SQL_DESC_BIND_TYPE                   */
     virtual SQLRETURN setRowNumber( SQLUINTEGER nRowNumber );                      
/*!< SQL_ATTR_ROW_NUMBER                                                */
     virtual SQLRETURN setRowOperationPtr( SQLUSMALLINT *pnRowOperationPtr );       
/*!< SQL_ATTR_ROW_OPERATION_PTR = ARD->SQL_DESC_ARRAY_STATUS_PTR        */ 
@@ -68,7 +69,7 @@
     virtual SQLUINTEGER getMaxRows();                   /*!< SQL_ATTR_MAX_ROWS        
                                         */
     virtual SQLUINTEGER getMetadataID();                /*!< SQL_ATTR_METADATA_ID     
                                         */
     virtual SQLUINTEGER getNoscan();                    /*!< SQL_ATTR_NOSCAN          
                                         */
-    virtual SQLUINTEGER *getParamBindOffsetPtr();       /*!<
SQL_ATTR_PARAM_BIND_OFFSET_PTR = APD->SQL_DESC_BIND_OFFSET_PTR     */
+    virtual SQLINTEGER *getParamBindOffsetPtr();        /*!<
SQL_ATTR_PARAM_BIND_OFFSET_PTR = APD->SQL_DESC_BIND_OFFSET_PTR     */
     virtual SQLUINTEGER getParamBindType();             /*!< SQL_ATTR_PARAM_BIND_TYPE
= APD->SQL_DESC_ BIND_TYPE                */
     virtual SQLUSMALLINT *getParamOperationPtr();       /*!<
SQL_ATTR_PARAM_OPERATION_PTR = APD->SQL_DESC_ARRAY_STATUS_PTR      */
     virtual SQLUSMALLINT *getParamStatusPtr();          /*!< SQL_ATTR_PARAM_STATUS_PTR
= IPD->SQL_DESC_ARRAY_STATUS_PTR         */
@@ -77,7 +78,7 @@
     virtual SQLUINTEGER getQueryTimeout();              /*!< SQL_ATTR_QUERY_TIMEOUT   
                                         */
     virtual SQLUINTEGER getRetrieveData();              /*!< SQL_ATTR_RETRIEVE_DATA   
                                         */
     virtual SQLUINTEGER getRowArraySize();              /*!< SQL_ATTR_ROW_ARRAY_SIZE =
ARD->SQL_DESC_ARRAY_SIZE                 */
-    virtual SQLUINTEGER *getRowBindOffsetPtr();         /*!<
SQL_ATTR_ROW_BIND_OFFSET_PTR = ARD->SQL_DESC_BIND_OFFSET_PTR       */
+    virtual SQLINTEGER *getRowBindOffsetPtr();          /*!<
SQL_ATTR_ROW_BIND_OFFSET_PTR = ARD->SQL_DESC_BIND_OFFSET_PTR       */
     virtual SQLUINTEGER getRowBindType();               /*!< SQL_ATTR_ROW_BIND_TYPE =
ARD->SQL_DESC_BIND_TYPE                   */
     virtual SQLUINTEGER getRowNumber();                 /*!< SQL_ATTR_ROW_NUMBER      
                                         */
     virtual SQLUSMALLINT *getRowOperationPtr();         /*!<
SQL_ATTR_ROW_OPERATION_PTR = ARD->SQL_DESC_ARRAY_STATUS_PTR        */ 
@@ -114,3 +115,5 @@
     SQLUINTEGER nSimulateCursor;        /*!< SQL_ATTR_SIMULATE_CURSOR               */
     SQLUINTEGER nUseBookmarks;          /*!< SQL_ATTR_USE_BOOKMARKS                 */
 };
+
+#endif

Modified: MYODBCDes/MYODBCDesLib/MYODBCDesRec.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesRec.cpp	2006-01-21 01:51:11 UTC (rev 48)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesRec.cpp	2006-01-27 04:30:56 UTC (rev 49)
@@ -1490,94 +1490,94 @@
             /* case SQL_C_XML:          *//*              ? */
             /* case SQL_C_BOOKMARK:     *//*  SQL_C_UBIGINT */ 
             /* case SQL_C_VARBOOKMARK:  *//*   SQL_C_BINARY */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( nConciseType );
             setDatetimeIntervalCode( 0 );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_TYPE_DATE:         /*             91 */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_DATETIME );
             setDatetimeIntervalCode( SQL_CODE_DATE );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_TYPE_TIME:         /*             92 */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_DATETIME );
             setDatetimeIntervalCode( SQL_CODE_TIME );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_TYPE_TIMESTAMP:    /*             93 */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_DATETIME );
             setDatetimeIntervalCode( SQL_CODE_TIMESTAMP );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_NUMERIC:           /*              2 */
         case SQL_C_GUID:              /*            -11 */
         case SQL_C_DEFAULT:           /*             99 */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( nConciseType );
             setDatetimeIntervalCode( 0 );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_MONTH:                    /* 102  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_MONTH );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_YEAR:                     /* 101  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_YEAR );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_YEAR_TO_MONTH:            /* 107  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_YEAR_TO_MONTH );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_DAY:                      /* 103  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_DAY );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_HOUR:                     /* 104  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_HOUR );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_MINUTE:                   /* 105  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_MINUTE );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_SECOND:                   /* 106  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_SECOND );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_DAY_TO_HOUR:              /* 108  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_DAY_TO_HOUR );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_DAY_TO_MINUTE:            /* 109  */  
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_DAY_TO_MINUTE );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_DAY_TO_SECOND:            /* 110  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_DAY_TO_SECOND );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_HOUR_TO_MINUTE:           /* 111  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_HOUR_TO_MINUTE );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_HOUR_TO_SECOND:           /* 112  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_HOUR_TO_SECOND );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_C_INTERVAL_MINUTE_TO_SECOND:         /* 113  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_MINUTE_TO_SECOND );
             MYODBCDbgReturn( SQL_SUCCESS );
@@ -1643,94 +1643,94 @@
         case SQL_BINARY:                            /*  -2  */
         case SQL_VARBINARY:                         /*  -3  */
         case SQL_LONGVARBINARY:                     /*  -4  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( nConciseType );
             setDatetimeIntervalCode( 0 );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_TYPE_DATE:                         /*  91  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_DATETIME );
             setDatetimeIntervalCode( SQL_CODE_DATE );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_TYPE_TIME:                         /*  92  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_DATETIME );
             setDatetimeIntervalCode( SQL_CODE_TIME );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_TYPE_TIMESTAMP:                    /*  93  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_DATETIME );
             setDatetimeIntervalCode( SQL_CODE_TIMESTAMP );
             MYODBCDbgReturn( SQL_SUCCESS );
             /* case SQL_TYPE_UTCDATETIME: */            /*   ?  */
             /* case SQL_TYPE_UTCTIME:     */            /*   ?  */
         case SQL_INTERVAL_MONTH:                    /* 102  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_MONTH );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_YEAR:                     /* 101  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_YEAR );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_YEAR_TO_MONTH:            /* 107  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_YEAR_TO_MONTH );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_DAY:                      /* 103  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_DAY );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_HOUR:                     /* 104  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_HOUR );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_MINUTE:                   /* 105  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_MINUTE );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_SECOND:                   /* 106  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_SECOND );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_DAY_TO_HOUR:              /* 108  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_DAY_TO_HOUR );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_DAY_TO_MINUTE:            /* 109  */  
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_DAY_TO_MINUTE );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_DAY_TO_SECOND:            /* 110  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_DAY_TO_SECOND );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_HOUR_TO_MINUTE:           /* 111  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_HOUR_TO_MINUTE );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_HOUR_TO_SECOND:           /* 112  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_HOUR_TO_SECOND );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_INTERVAL_MINUTE_TO_SECOND:         /* 113  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( SQL_INTERVAL );
             setDatetimeIntervalCode( SQL_CODE_MINUTE_TO_SECOND );
             MYODBCDbgReturn( SQL_SUCCESS );
         case SQL_GUID:                              /* -11  */
-            setConciseType( nConciseType );
+            this->nConciseType = nConciseType;
             setType( nConciseType );
             setDatetimeIntervalCode( 0 );
             MYODBCDbgReturn( SQL_SUCCESS );

Modified: connector-odbc.vpw
===================================================================
--- connector-odbc.vpw	2006-01-21 01:51:11 UTC (rev 48)
+++ connector-odbc.vpw	2006-01-27 04:30:56 UTC (rev 49)
@@ -4,6 +4,7 @@
 		<Project File="dltest/dltest.vpj"/>
 		<Project File="MYODBCAtt/MYODBCAtt.vpj"/>
 		<Project File="MYODBCAtt/MYODBCAttLib/MYODBCAttLib.vpj"/>
+		<Project File="MYODBCAtt/MYODBCAttTest/MYODBCAttTest.vpj"/>
 		<Project File="MYODBCC/MYODBCC.vpj"/>
 		<Project File="MYODBCC/MYODBCCLib/MYODBCCLib.vpj"/>
 		<Project File="MYODBCC/MYODBCCTest/MYODBCCTest.vpj"/>

Modified: root.pro
===================================================================
--- root.pro	2006-01-21 01:51:11 UTC (rev 48)
+++ root.pro	2006-01-27 04:30:56 UTC (rev 49)
@@ -52,6 +52,7 @@
 #		MYODBCSetup \
 		MYODBCDia \
 		MYODBCDes \
+                MYODBCAtt \
         	MYODBCRes
 #		MYODBCDrv \
 #                MYODBCInstaller \

Thread
Connector/ODBC 5 commit: r49 - / MYODBCAtt MYODBCAtt/MYODBCAttLib MYODBCAtt/MYODBCAttTest MYODBCAtt/include MYODBCDes/MYODBCDesLibpharvey27 Jan