Modified:
MYODBCDes/MYODBCDesLib/MYODBCDes.cpp
MYODBCDes/MYODBCDesLib/MYODBCDesAPD.cpp
MYODBCDes/MYODBCDesLib/MYODBCDesARD.cpp
MYODBCDes/MYODBCDesLib/MYODBCDesIPD.cpp
MYODBCDes/MYODBCDesLib/MYODBCDesIRD.cpp
MYODBCDes/MYODBCDesTest/MYODBCDesTest.cpp
MYODBCDes/include/MYODBCDes.h
MYODBCDes/include/MYODBCDesAPD.h
MYODBCDes/include/MYODBCDesARD.h
MYODBCDes/include/MYODBCDesIPD.h
MYODBCDes/include/MYODBCDesIRD.h
MYODBCRes/MYODBCResLib/MYODBCResServer.cpp
MYODBCRes/include/MYODBCResDriver.h
MYODBCRes/include/MYODBCResServer.h
Log:
UNICODE:
- more work done on MYODBCResServer (server prepared statements) but not done yet
Modified: MYODBCDes/MYODBCDesLib/MYODBCDes.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDes.cpp 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/MYODBCDesLib/MYODBCDes.cpp 2006-01-17 02:35:41 UTC (rev 42)
@@ -34,12 +34,7 @@
{
MYODBCDbgEnter();
- nAllocType = SQL_DESC_ALLOC_USER;
- nArraySize = 1;
- pnArrayStatusPtr = NULL;
- pnBindOffsetPtr = NULL;
- nBindType = SQL_BIND_BY_COLUMN;
- pnRowsProcessedPtr = NULL;
+ doInit();
/* derived classes must create bookmark ass needed */
@@ -1008,3 +1003,30 @@
MYODBCDbgReturn3( "%p", pdia );
}
+void MYODBCDes::doClear()
+{
+ MYODBCDbgEnter();
+
+ while ( listRecords.count() )
+ {
+ delete listRecords.takeLast();
+ }
+
+ doInit();
+
+ MYODBCDbgReturn2();
+}
+
+void MYODBCDes::doInit()
+{
+ MYODBCDbgEnter();
+
+ nAllocType = SQL_DESC_ALLOC_USER;
+ nArraySize = 1;
+ pnArrayStatusPtr = NULL;
+ pnBindOffsetPtr = NULL;
+ nBindType = SQL_BIND_BY_COLUMN;
+ pnRowsProcessedPtr = NULL;
+
+ MYODBCDbgReturn2();
+}
Modified: MYODBCDes/MYODBCDesLib/MYODBCDesAPD.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesAPD.cpp 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesAPD.cpp 2006-01-17 02:35:41 UTC (rev 42)
@@ -3,22 +3,7 @@
MYODBCDesAPD::MYODBCDesAPD( SQLHANDLE hOwner )
: MYODBCDes( hOwner )
{
- /* 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.)
- */
- MYODBCDesRecAPD *precord = new MYODBCDesRecAPD( this );
- precord->setConciseType( SQL_BINARY );
- precord->setType( SQL_BINARY );
- precord->setDatetimeIntervalCode( 0 );
- listRecords.prepend( precord );
+ doInit();
}
SQLRETURN MYODBCDesAPD::setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT
nFieldIdentifier, SQLPOINTER pValuePtr, SQLINTEGER nBufferLength )
@@ -170,4 +155,24 @@
MYODBCDbgReturn( SQL_SUCCESS );
}
+void MYODBCDesAPD::doInit()
+{
+ MYODBCDes::doInit();
+ /* 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.)
+ */
+ MYODBCDesRecAPD *precord = new MYODBCDesRecAPD( this );
+ precord->setConciseType( SQL_BINARY );
+ precord->setType( SQL_BINARY );
+ precord->setDatetimeIntervalCode( 0 );
+ listRecords.prepend( precord );
+}
Modified: MYODBCDes/MYODBCDesLib/MYODBCDesARD.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesARD.cpp 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesARD.cpp 2006-01-17 02:35:41 UTC (rev 42)
@@ -3,22 +3,7 @@
MYODBCDesARD::MYODBCDesARD( SQLHANDLE hOwner )
: MYODBCDes( hOwner )
{
- /* 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.)
- */
- MYODBCDesRecARD *precord = new MYODBCDesRecARD( this );
- precord->setConciseType( SQL_BINARY );
- precord->setType( SQL_BINARY );
- precord->setDatetimeIntervalCode( 0 );
- listRecords.prepend( precord );
+ doInit();
}
SQLRETURN MYODBCDesARD::setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT
nFieldIdentifier, SQLPOINTER pValuePtr, SQLINTEGER nBufferLength )
@@ -185,4 +170,25 @@
MYODBCDbgReturn( SQL_SUCCESS );
}
+void MYODBCDesARD::doInit()
+{
+ MYODBCDes::doInit();
+ /* 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.)
+ */
+ MYODBCDesRecARD *precord = new MYODBCDesRecARD( this );
+ precord->setConciseType( SQL_BINARY );
+ precord->setType( SQL_BINARY );
+ precord->setDatetimeIntervalCode( 0 );
+ listRecords.prepend( precord );
+}
+
Modified: MYODBCDes/MYODBCDesLib/MYODBCDesIPD.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesIPD.cpp 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesIPD.cpp 2006-01-17 02:35:41 UTC (rev 42)
@@ -3,22 +3,7 @@
MYODBCDesIPD::MYODBCDesIPD( SQLHANDLE hOwner )
: MYODBCDes( hOwner )
{
- /* 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.)
- */
- MYODBCDesRecIPD *precord = new MYODBCDesRecIPD( this );
- precord->setConciseType( SQL_BINARY );
- precord->setType( SQL_BINARY );
- precord->setDatetimeIntervalCode( 0 );
- listRecords.prepend( precord );
+ doInit();
}
SQLRETURN MYODBCDesIPD::setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT
nFieldIdentifier, SQLPOINTER pValuePtr, SQLINTEGER nBufferLength )
@@ -181,6 +166,24 @@
MYODBCDbgReturn( SQL_SUCCESS );
}
+void MYODBCDesIPD::doInit()
+{
+ MYODBCDes::doInit();
+ /* 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.)
+ */
+ MYODBCDesRecIPD *precord = new MYODBCDesRecIPD( this );
+ precord->setConciseType( SQL_BINARY );
+ precord->setType( SQL_BINARY );
+ precord->setDatetimeIntervalCode( 0 );
+ listRecords.prepend( precord );
+}
Modified: MYODBCDes/MYODBCDesLib/MYODBCDesIRD.cpp
===================================================================
--- MYODBCDes/MYODBCDesLib/MYODBCDesIRD.cpp 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/MYODBCDesLib/MYODBCDesIRD.cpp 2006-01-17 02:35:41 UTC (rev 42)
@@ -3,22 +3,7 @@
MYODBCDesIRD::MYODBCDesIRD( SQLHANDLE hOwner )
: MYODBCDes( hOwner )
{
- /* 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.)
- */
- MYODBCDesRecIRD *precord = new MYODBCDesRecIRD( this );
- precord->setConciseType( SQL_BINARY );
- precord->setType( SQL_BINARY );
- precord->setDatetimeIntervalCode( 0 );
- listRecords.prepend( precord );
+ doInit();
}
SQLRETURN MYODBCDesIRD::setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT
nFieldIdentifier, SQLPOINTER pValuePtr, SQLINTEGER nBufferLength )
@@ -144,7 +129,25 @@
MYODBCDbgReturn( SQL_SUCCESS );
}
+void MYODBCDesIRD::doInit()
+{
+ MYODBCDes::doInit();
+ /* 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.)
+ */
+ MYODBCDesRecIRD *precord = new MYODBCDesRecIRD( this );
+ precord->setConciseType( SQL_BINARY );
+ precord->setType( SQL_BINARY );
+ precord->setDatetimeIntervalCode( 0 );
+ listRecords.prepend( precord );
+}
-
Modified: MYODBCDes/MYODBCDesTest/MYODBCDesTest.cpp
===================================================================
--- MYODBCDes/MYODBCDesTest/MYODBCDesTest.cpp 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/MYODBCDesTest/MYODBCDesTest.cpp 2006-01-17 02:35:41 UTC (rev 42)
@@ -17,6 +17,7 @@
void countUp();
void autoCountUp();
void countDown();
+ void clear();
};
MYODBCDesTest::MYODBCDesTest()
@@ -47,7 +48,7 @@
/* this failing would be bad :... */
QVERIFY( pdes );
/* whats is max record number we can access... */
- QVERIFY( pdes->getCount() == 0 );
+ QCOMPARE( (int)pdes->getCount(), 0 );
delete pdes;
}
@@ -124,6 +125,23 @@
delete pdes;
}
+void MYODBCDesTest::clear()
+{
+ MYODBCDesAPD * pdes = new MYODBCDesAPD( (SQLHANDLE)1 );
+ SQLSMALLINT nCount = 5;
+
+ /* modify so we can see if clear works... */
+ pdes->setArraySize( 10 );
+ pdes->setDescField( 0, SQL_DESC_COUNT, (SQLPOINTER)nCount, SQL_IS_SMALLINT );
+ QCOMPARE( pdes->getCount(), nCount );
+ /* do clear and verify that fields and records are set to defaults... */
+ pdes->doClear();
+ QCOMPARE( (int)pdes->getArraySize(), 1 );
+ QCOMPARE( (int)pdes->getCount(), 0 );
+
+ delete pdes;
+}
+
QTEST_MAIN( MYODBCDesTest )
#include "MYODBCDesTest.moc"
Modified: MYODBCDes/include/MYODBCDes.h
===================================================================
--- MYODBCDes/include/MYODBCDes.h 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/include/MYODBCDes.h 2006-01-17 02:35:41 UTC (rev 42)
@@ -134,13 +134,13 @@
virtual SQLRETURN getDescField( SQLSMALLINT nRecNumber, SQLSMALLINT nFieldIdentifier,
SQLPOINTER pValuePtr, SQLINTEGER nBufferLength, SQLINTEGER *pnStringLengthPtr );
/* header fields */
- virtual SQLSMALLINT getAllocType();
- virtual SQLUINTEGER getArraySize();
- virtual SQLUSMALLINT *getArrayStatusPtr();
- virtual SQLINTEGER *getBindOffsetPtr();
- virtual SQLUINTEGER getBindType();
- virtual SQLSMALLINT getCount();
- virtual SQLUINTEGER *getRowsProcessedPtr();
+ virtual SQLSMALLINT getAllocType();
+ virtual SQLUINTEGER getArraySize();
+ virtual SQLUSMALLINT * getArrayStatusPtr();
+ virtual SQLINTEGER * getBindOffsetPtr();
+ virtual SQLUINTEGER getBindType();
+ virtual SQLSMALLINT getCount();
+ virtual SQLUINTEGER * getRowsProcessedPtr();
/* record fields */
virtual SQLINTEGER getAutoUniqueValue( SQLSMALLINT nRecord );
@@ -182,6 +182,8 @@
SQLHANDLE getOwner();
MYODBCDia *getDia();
+ virtual void doClear();
+
protected:
SQLHANDLE hOwner; /*!< dbc if explicit else stmt
*/
MYODBCDia * pdia; /*!< errors, warnings, etc
*/
@@ -196,6 +198,8 @@
QList<MYODBCDesRec*> 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.
*/
+
+ virtual void doInit();
};
#include "MYODBCDesAPD.h"
Modified: MYODBCDes/include/MYODBCDesAPD.h
===================================================================
--- MYODBCDes/include/MYODBCDesAPD.h 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/include/MYODBCDesAPD.h 2006-01-17 02:35:41 UTC (rev 42)
@@ -25,6 +25,9 @@
SQLRETURN setCount( SQLSMALLINT nCount, bool bUnbind = false );
/* getters */
+
+protected:
+ void doInit();
};
#endif
Modified: MYODBCDes/include/MYODBCDesARD.h
===================================================================
--- MYODBCDes/include/MYODBCDesARD.h 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/include/MYODBCDesARD.h 2006-01-17 02:35:41 UTC (rev 42)
@@ -25,6 +25,9 @@
SQLRETURN setCount( SQLSMALLINT nCount, bool bUnbind = false );
/* getters */
+
+protected:
+ void doInit();
};
#endif
Modified: MYODBCDes/include/MYODBCDesIPD.h
===================================================================
--- MYODBCDes/include/MYODBCDesIPD.h 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/include/MYODBCDesIPD.h 2006-01-17 02:35:41 UTC (rev 42)
@@ -25,6 +25,9 @@
SQLRETURN setCount( SQLSMALLINT nCount, bool bUnbind = false );
/* getters */
+
+protected:
+ void doInit();
};
#endif
Modified: MYODBCDes/include/MYODBCDesIRD.h
===================================================================
--- MYODBCDes/include/MYODBCDesIRD.h 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCDes/include/MYODBCDesIRD.h 2006-01-17 02:35:41 UTC (rev 42)
@@ -25,6 +25,9 @@
SQLRETURN setCount( SQLSMALLINT nCount, bool bUnbind = false );
/* getters */
+
+protected:
+ void doInit();
};
#endif
Modified: MYODBCRes/MYODBCResLib/MYODBCResServer.cpp
===================================================================
--- MYODBCRes/MYODBCResLib/MYODBCResServer.cpp 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCRes/MYODBCResLib/MYODBCResServer.cpp 2006-01-17 02:35:41 UTC (rev 42)
@@ -5,9 +5,11 @@
{
MYODBCDbgEnter();
- pstm = mysql_stmt_init( pmysql );
+ pstm = mysql_stmt_init( pmysql );
+ nRow = 0;
+ pbindColumns = NULL;
+
Q_ASSERT( !pstm );
- nRow = 0;
MYODBCDbgReturn2();
}
@@ -21,9 +23,7 @@
MYODBCDbgReturn2();
}
-+++++++++++++
-
-SQLRETURN MYODBCResServer::setData( uint nColumn, const QVariant &variantData )
+SQLRETURN MYODBCResServer::setData( uint nColumn, const QVariant & )
{
MYODBCDbgEnter();
@@ -32,9 +32,7 @@
// can not write this column (and it does not really exist anyway as bookmark is row
num)
Q_ASSERT( nColumn == 0 );
- listResults[ nRow - 1 ].replace( nColumn - 1, variantData );
-
- MYODBCDbgReturn( SQL_SUCCESS );
+ MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY000, 0, "setData not supported here
- use UPDATE." ) );
}
SQLRETURN MYODBCResServer::setRow( qulonglong nRow )
@@ -59,19 +57,14 @@
MYODBCDbgReturn( SQL_SUCCESS );
}
-SQLRETURN MYODBCResServer::getData( uint nColumn, QVariant &variantData )
+SQLRETURN MYODBCResServer::getData( uint nColumn, QVariant & )
{
MYODBCDbgEnter();
Q_ASSERT( !isValidRow() );
Q_ASSERT( !isValidColumn( nColumn ) );
- if ( nColumn == 0 )
- variantData = nRow; // bookmark is row num - obvious limitations apply
- else
- variantData = listResults[ nRow - 1 ][ nColumn - 1 ];
-
- MYODBCDbgReturn( SQL_SUCCESS );
+ MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY000, 0, "getData not supported here
- use SELECT with bound columns." ) );
}
SQLRETURN MYODBCResServer::getRow( qulonglong *pnRow )
@@ -190,11 +183,19 @@
MYODBCDbgReturn( SQL_SUCCESS );
}
-SQLRETURN MYODBCResServer::doPrepare( const QString & )
+SQLRETURN MYODBCResServer::doPrepare( const QString &stringStatement )
{
MYODBCDbgEnter();
- MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY000, 0, "Prepare a statement is not
relevant for driver generated resultsets." ) );
+ if ( mysql_stmt_prepare( pstm, stringStatement, stringStatement.length() ) )
+ MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY000, mysql_stmt_errno(
pRes->u.pStmt->pStmt ), (SQLCHAR*)mysql_stmt_error( pRes->u.pStmt->pStmt ) )
);
+
+ this->stringStatement = stringStatement;
+
+ /* store FIELD info in the IRD and bind all columns (opt latter bit later) */
+ MYODBCResStoreMetaData( pRes );
+
+ MYODBCDbgReturn( SQL_SUCCESS );
}
SQLRETURN MYODBCResServer::doPrev()
@@ -266,4 +267,453 @@
}
+SQLRETURN MYODBCResServer::doLoadMetaData()
+{
+ MYSQL_RES *pMetaData;
+ MYODBCDbgEnter();
+
+ pMetaData = mysql_stmt_result_metadata( pstmt );
+
+ if ( pMetaData )
+ {
+ unsigned int nFields;
+
+ nFields = mysql_num_fields( pMetaData );
+ if ( nFields )
+ {
+ unsigned int nField;
+ MYSQL_FIELD * pField;
+
+ pdesIRD->doClear();
+ pdesIRD->setCount( nFields, true );
+
+ pstm->pbindColumns = MYODBCCCalloc( nFields, sizeof(MYSQL_BIND) );
+
+ mysql_field_seek( pMetaData, 0 );
+ for ( nField = 0; nField < nFields; nField++ )
+ {
+ pField = mysql_fetch_field( pMetaData );
+ nReturn = doLoadMetaDataField( nField + 1, pField );
+ if ( !SQL_SUCCEEDED( nReturn ) )
+ {
+ mysql_free_result( pMetaData );
+ MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY000, 0, "Failed to
store field descriptor information." ) );
+ }
+
+ /*
+ bind all columns in resultset because;
+ - ODBC binding can be changed (columns added/removed) even after
resultset generated
+ - SQLGetData can be used to get unbound columns
+ */
+ (pstm->pbindColumns)[nField].buffer_type = pField->type;
+ (pstm->pbindColumns)[nField].buffer_length = pField->max_length +
1;
+ (pstm->pbindColumns)[nField].buffer = MYODBCCMalloc(
pField->max_length + 1 );
+ }
+
+ if ( mysql_stmt_bind_result( pstm, pstm->pbindColumns ) )
+ {
+ pdia->doAppend( MYODBC_DIA_HY000, mysql_stmt_errno( pstm ),
mysql_stmt_error( pstm ) );
+ mysql_free_result( pMetaData );
+ MYODBCDbgReturn( SQL_ERROR );
+ }
+ }
+ }
+
+ MYODBCDbgReturn( SQL_SUCCESS );
+}
+
+SQLRETURN MYODBCResServer::doLoadMetaDataField( unsigned int nField, MYSQL_FIELD *pField
)
+{
+ MYODBCDbgEnter();
+
+ if ( !pField )
+ {
+ MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY000, 0, "Failed to store field
descriptor information." ) );
+ }
+
+ /*
+ WARNING!!!
+
+ This function needs to be revisited and reviewed - probably several times.
+
+ This is a blend of my interpretation (1st pass kind of thing) and what
+ is found in the old driver. Some of what is in here is certianly in
+ need if some changing.
+ */
+
+ /*
+ common
+
+ All fields are included (in alpha order) for completeness. Comments
+ are made to state why some are not relevant. Again; there may be
+ calculated fields in here which are set now with the thinking that
+ it will make maintaining and working with the whole descriptor
+ business easier (for example; desc_label which could be just mapped
+ to desc_name as needed but is set now).
+
+ These must be handled before the type specific ones because in some
+ cases the values set here are replaced depending upon the type -
+ but only sometimes.
+ */
+ pdesIRD->setAutoUniqueValue( nField, (pField->flags &&
AUTO_INCREMENT_FLAG) ? SQL_TRUE : SQL_FALSE ) );
+ pdesIRD->setBaseColumnName( nField, (pField->org_name ? pField->org_name :
"") );
+ pdesIRD->setBaseTableName( nField, (pField->org_table ? pField->org_table :
"") );
+ pdesIRD->setCaseSensitive( nField, (pField->flags & BINARY_FLAG ? SQL_FALSE
: SQL_TRUE) );
+ pdesIRD->setCatalogName( nField, (pField->catalog ? pField->catalog : "") );
+/* pdesIRD->setconcise_type; - type specific */
+/* pdesIRD->setdata_ptr; - N/A */
+/* pdesIRD->setdatetime_interval_code; - type specific */
+ pdesIRD->setDatetimeIntervalPrecision( nField, 10 ); /* this is a
conservative guess - not sure what precision we get when we diff 2 times */
+ pdesIRD->setDisplaySize( nField, pField->max_length ); /* - also type
specific */
+ pdesIRD->setFixedPrecScale( nField, SQL_FALSE ); /* - also type
specific */
+/* pdesIRD->setindicator_ptr; - N/A */
+ pdesIRD->setLabel( nField, pField->name );
+/* pdesIRD->setlength; - type specific */
+/* pdesIRD->setliteral_prefix; - type specific */
+/* pdesIRD->setliteral_suffix; - type specific */
+ pdesIRD->setLocalTypeName( nField, "" );
+ pdesIRD->setName( nField pField->name );
+ pdesIRD->setNullable( nField, ((pField->flags && NOT_NULL_FLAG) ?
SQL_NO_NULLS : SQL_NULLABLE) );
+/* pdesIRD->setnum_prec_radix; - type specific */
+/* pdesIRD->setoctet_length; - type specific */
+/* pdesIRD->setoctet_length_ptr; - N/A */
+/* pdesIRD->setparamter_type; - N/A */
+/* pdesIRD->setprecision; - type specific */
+ pdesIRD->setRowver( nField, SQL_FALSE ); /* - also type specific */
+ pdesIRD->setScale( nField, pField->decimals );
+ pdesIRD->setSchemaName( nField, pField->db );
+ pdesIRD->setSearchable( nField, SQL_PRED_SEARCHABLE );
+ pdesIRD->setTableName( nField, pField->table );
+/* pdesIRD->settype; - type specific */
+/* pdesIRD->settype_name; - type specific */
+ pdesIRD->setUnnamed( nField, SQL_NAMED );
+ pdesIRD->setUnsigned( nField, (pField->flags & UNSIGNED_FLAG ? SQL_TRUE :
SQL_FALSE) );
+ pdesIRD->setUpdatable( nField, (pField->table && pField->table[0] ?
SQL_ATTR_READWRITE_UNKNOWN : SQL_ATTR_READONLY) );
+
+ /*
+ set type specific values here
+
+ All supported mysql field types in *alpha* order (for readability).
+
+ Many descriptor fields can be set without much regard to the type
+ or are may not even be used given that we are an IRD.
+
+ The ones set in this switch/case are special cases where the
+ values are dependent upon the type. Note that MYODBCDesRecType
+ does set some related fields in the descriptor to ensure that
+ the related fields are valid.
+ */
+ switch ( pField->type )
+ {
+ case MYSQL_TYPE_BLOB:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ if ( pField->flags & BINARY_FLAG )
+ {
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setTypeName( nField, "blob" );
+ setConciseTypeSQL( SQL_LONGVARBINARY );
+ }
+ else
+ {
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setTypeName( nField, "text" );
+ setConciseTypeSQL( SQL_LONGVARCHAR );
+ }
+ break;
+ case MYSQL_TYPE_DATE:
+ pdesIRD->setDisplaySize( nField, 10 );
+ pdesIRD->setLength( nField, 10 );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setPrecision( nField, 10 );
+ pdesIRD->setTypeName( nField, "date" );
+ setConciseTypeSQL( SQL_TYPE_DATE );
+ break;
+ case MYSQL_TYPE_DATETIME:
+ pdesIRD->setDisplaySize( nField, 19 );
+ pdesIRD->setLength( nField, 19 );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setPrecision( nField, 19 );
+ pdesIRD->setTypeName( nField, "datetime" );
+ setConciseTypeSQL( SQL_TYPE_TIMESTAMP );
+ break;
+ case MYSQL_TYPE_DECIMAL:
+ pdesIRD->setDisplaySize( nField, max( pField->length,
pField->max_length ) - test( !( pField->flags & UNSIGNED_FLAG ) ) - test(
pField->decimals ) );
+ pdesIRD->setFixedPrecScale( nField, pField->decimals ? SQL_TRUE :
SQL_FALSE );
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 10 );
+ pdesIRD->setPrecision( nField, (SQLSMALLINT)max( pField->length,
pField->max_length ) - test( !( pField->flags & UNSIGNED_FLAG ) ) - test(
pField->decimals ) );
+ pdesIRD->setTypeName( nField, "decimal" );
+ setConciseTypeSQL( SQL_DECIMAL );
+ break;
+ case MYSQL_TYPE_DOUBLE:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 2 );
+ pdesIRD->setPrecision( nField, (SQLSMALLINT)pField->max_length );
+ if ( pField->flags & UNSIGNED_FLAG )
+ pdesIRD->setTypeName( nField, "double unsigned" );
+ else
+ pdesIRD->setTypeName( nField, "double" );
+ setConciseTypeSQL( SQL_DOUBLE );
+ break;
+ case MYSQL_TYPE_ENUM:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setTypeName( nField, "enum" );
+ setConciseTypeSQL( SQL_CHAR );
+ break;
+ case MYSQL_TYPE_FLOAT:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 2 );
+ pdesIRD->setPrecision( nField, (SQLSMALLINT)pField->max_length );
+ if ( pField->flags & UNSIGNED_FLAG )
+ pdesIRD->setTypeName( nField, "float unsigned" );
+ else
+ pdesIRD->setTypeName( nField, "float" );
+ setConciseTypeSQL( SQL_REAL );
+ break;
+ case MYSQL_TYPE_GEOMETRY:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setTypeName( nField, "blob" );
+ setConciseTypeSQL( SQL_LONGVARBINARY );
+ break;
+ case MYSQL_TYPE_INT24:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 2 );
+ pdesIRD->setPrecision( nField, (SQLSMALLINT)pField->max_length );
+ if ( pField->flags & UNSIGNED_FLAG )
+ pdesIRD->setTypeName( nField, "mediumint unsigned" );
+ else
+ pdesIRD->setTypeName( nField, "mediumint" );
+ setConciseTypeSQL( SQL_INTEGER );
+ break;
+ case MYSQL_TYPE_LONG:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 2 );
+ pdesIRD->setPrecision( nField, (SQLSMALLINT)pField->max_length );
+ if ( pField->flags & UNSIGNED_FLAG )
+ pdesIRD->setTypeName( nField, "integer unsigned" );
+ else
+ pdesIRD->setTypeName( nField, "integer" );
+ setConciseTypeSQL( SQL_TINYINT );
+ break;
+ case MYSQL_TYPE_LONG_BLOB:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ if (pField->flags & BINARY_FLAG)
+ {
+ pdesIRD->setTypeName( nField, "longblob" );
+ setConciseTypeSQL( SQL_LONGVARBINARY );
+ }
+ else
+ {
+ pdesIRD->setTypeName( nField, "longtext" );
+ setConciseTypeSQL( SQL_LONGVARCHAR );
+ }
+ break;
+ case MYSQL_TYPE_LONGLONG:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 2 );
+ if ( pField->flags & UNSIGNED_FLAG )
+ {
+ pdesIRD->setPrecision( nField, 20 );
+ pdesIRD->setTypeName( nField, "bigint unsigned" );
+ }
+ else
+ {
+ pdesIRD->setPrecision( nField, 19 );
+ pdesIRD->setTypeName( nField, "bigint" );
+ }
+ setConciseTypeSQL( SQL_BIGINT );
+ break;
+ case MYSQL_TYPE_MEDIUM_BLOB:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ if ( pField->flags & BINARY_FLAG )
+ {
+ pdesIRD->setTypeName( nField, "mediumblob" );
+ setConciseTypeSQL( SQL_LONGVARBINARY );
+ }
+ else
+ {
+ pdesIRD->setTypeName( nField, "mediumtext" );
+ setConciseTypeSQL( SQL_LONGVARCHAR );
+ }
+ break;
+ case MYSQL_TYPE_NEWDATE:
+ pdesIRD->setDisplaySize( nField, 10 );
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setPrecision( nField, 10 );
+ pdesIRD->setTypeName( nField, "date" );
+ setConciseTypeSQL( SQL_TYPE_DATE );
+ break;
+ case MYSQL_TYPE_NULL:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setTypeName( nField, "null" );
+ setConciseTypeSQL( SQL_VARCHAR );
+ break;
+ case MYSQL_TYPE_SHORT:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 2 );
+ pdesIRD->setPrecision( nField, (SQLSMALLINT)pField->max_length );
+ if ( pField->flags & UNSIGNED_FLAG )
+ pdesIRD->setTypeName( nField, "smallint unsigned" );
+ else
+ pdesIRD->setTypeName( nField, "smallint" );
+ setConciseTypeSQL( SQL_SMALLINT );
+ break;
+ case MYSQL_TYPE_TIME:
+ pdesIRD->setDisplaySize( nField, 8 );
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setPrecision( nField, 8 );
+ pdesIRD->setTypeName( nField, "time" );
+ setConciseTypeSQL( SQL_TYPE_TIME );
+ break;
+ case MYSQL_TYPE_TIMESTAMP:
+ pdesIRD->setDisplaySize( nField, 19 );
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setPrecision( nField, 19 );
+ pdesIRD->setRowver( nField, SQL_TRUE );
+ pdesIRD->setTypeName( nField, "timestamp" );
+ setConciseTypeSQL( SQL_TYPE_TIMESTAMP );
+ break;
+ case MYSQL_TYPE_SET:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setTypeName( nField, "set" );
+ setConciseTypeSQL( SQL_CHAR );
+ break;
+ case MYSQL_TYPE_STRING:
+ pdesIRD->setDisplaySize( nField, pField->length ? pField->length :
255 );
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setTypeName( nField, "char" );
+ setConciseTypeSQL( SQL_CHAR );
+ break;
+ case MYSQL_TYPE_TINY:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 2 );
+ pdesIRD->setPrecision( nField, (SQLSMALLINT)pField->max_length );
+ if ( pField->flags & NUM_FLAG )
+ {
+ if ( pField->flags & UNSIGNED_FLAG )
+ pdesIRD->setTypeName( nField, "tinyint unsigned" );
+ else
+ pdesIRD->setTypeName( nField, "tinyint" );
+ setConciseTypeSQL( SQL_TINYINT );
+ }
+ else
+ {
+ if ( pField->flags & UNSIGNED_FLAG )
+ pdesIRD->setTypeName( nField, "char unsigned" );
+ else
+ pdesIRD->setTypeName( nField, "char" );
+ setConciseTypeSQL( SQL_CHAR );
+ }
+ break;
+ case MYSQL_TYPE_TINY_BLOB:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "" );
+ pdesIRD->setLiteralSuffix( nField, "" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ if ( pField->flags & BINARY_FLAG )
+ {
+ pdesIRD->setTypeName( nField, "tinyblob" );
+ setConciseTypeSQL( SQL_LONGVARBINARY );
+ }
+ else
+ {
+ pdesIRD->setTypeName( nField, "tinytext" );
+ setConciseTypeSQL( SQL_LONGVARCHAR );
+ }
+ break;
+ case MYSQL_TYPE_VAR_STRING:
+ pdesIRD->setDisplaySize( nField, pField->length ? pField->length :
255 );
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setTypeName( nField, "varchar" );
+ setConciseTypeSQL( SQL_VARCHAR );
+ break;
+ case MYSQL_TYPE_YEAR:
+ pdesIRD->setLength( nField, pField->max_length );
+ pdesIRD->setLiteralPrefix( nField, "\"'" );
+ pdesIRD->setLiteralSuffix( nField, "\"'" );
+ pdesIRD->setNumPrecRadix( nField, 0 );
+ pdesIRD->setOctetLength( nField, pField->max_length );
+ pdesIRD->setPrecision( nField, (SQLSMALLINT)pField->max_length );
+ pdesIRD->setTypeName( nField, "year" );
+ setConciseTypeSQL( SQL_SMALLINT );
+ break;
+ default:
+ {
+ MYODBCDbgReturn( pdia->doAppend( MYODBC_DIA_HY000, 0, QString( "%1 is an
unknown MYSQL column data type." ).arg( pField->type ) ) );
+ }
+ }
+
+ MYODBCDbgReturn( SQL_SUCCESS );
+}
+
Modified: MYODBCRes/include/MYODBCResDriver.h
===================================================================
--- MYODBCRes/include/MYODBCResDriver.h 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCRes/include/MYODBCResDriver.h 2006-01-17 02:35:41 UTC (rev 42)
@@ -7,31 +7,31 @@
{
public:
MYODBCResDriver( MYODBCDia *pdia, MYODBCDes *pdesIRD, MYSQL *pmysql );
- virtual ~MYODBCResDriver();
+ ~MYODBCResDriver();
- virtual SQLRETURN setData( uint nColumn, const QVariant &variantData );
- virtual SQLRETURN setRow( qulonglong nRow );
+ SQLRETURN setData( uint nColumn, const QVariant &variantData );
+ SQLRETURN setRow( qulonglong nRow );
- virtual SQLRETURN getColumns( uint *pnColumns );
- virtual SQLRETURN getData( uint nColumn, QVariant &variantData );
- virtual SQLRETURN getRow( qulonglong *pnRow );
- virtual SQLRETURN getRows( qulonglong *pnRows );
+ SQLRETURN getColumns( uint *pnColumns );
+ SQLRETURN getData( uint nColumn, QVariant &variantData );
+ SQLRETURN getRow( qulonglong *pnRow );
+ SQLRETURN getRows( qulonglong *pnRows );
- virtual SQLRETURN doAppend();
- virtual SQLRETURN doClear();
- virtual SQLRETURN doDelete();
- virtual SQLRETURN doExecute();
- virtual SQLRETURN doFirst();
- virtual SQLRETURN doInsert();
- virtual SQLRETURN doLast();
- virtual SQLRETURN doNext();
- virtual SQLRETURN doPrepare( const QString &stringStatement );
- virtual SQLRETURN doPrev();
- virtual SQLRETURN doSeek( qlonglong nRow );
- virtual SQLRETURN doSkip( qlonglong nRows );
+ SQLRETURN doAppend();
+ SQLRETURN doClear();
+ SQLRETURN doDelete();
+ SQLRETURN doExecute();
+ SQLRETURN doFirst();
+ SQLRETURN doInsert();
+ SQLRETURN doLast();
+ SQLRETURN doNext();
+ SQLRETURN doPrepare( const QString &stringStatement );
+ SQLRETURN doPrev();
+ SQLRETURN doSeek( qlonglong nRow );
+ SQLRETURN doSkip( qlonglong nRows );
- virtual bool isValidRow();
- virtual bool isValidRow( qulonglong nRow );
+ bool isValidRow();
+ bool isValidRow( qulonglong nRow );
protected:
/* Our result set is a list of rows. Each row is a vector of column data. Column data
is a QVariant. */
Modified: MYODBCRes/include/MYODBCResServer.h
===================================================================
--- MYODBCRes/include/MYODBCResServer.h 2006-01-16 04:56:16 UTC (rev 41)
+++ MYODBCRes/include/MYODBCResServer.h 2006-01-17 02:35:41 UTC (rev 42)
@@ -7,35 +7,40 @@
{
public:
MYODBCResServer( MYODBCDia *pdia, MYODBCDes *pdesIRD, MYSQL *pmysql );
- virtual ~MYODBCResServer();
+ ~MYODBCResServer();
- virtual SQLRETURN setData( uint nColumn, const QVariant &variantData );
- virtual SQLRETURN setRow( qulonglong nRow );
+ SQLRETURN setData( uint nColumn, const QVariant &variantData );
+ SQLRETURN setRow( qulonglong nRow );
- virtual SQLRETURN getColumns( uint *pnColumns );
- virtual SQLRETURN getData( uint nColumn, QVariant &variantData );
- virtual SQLRETURN getRow( qulonglong *pnRow );
- virtual SQLRETURN getRows( qulonglong *pnRows );
+ SQLRETURN getColumns( uint *pnColumns );
+ SQLRETURN getData( uint nColumn, QVariant &variantData );
+ SQLRETURN getRow( qulonglong *pnRow );
+ SQLRETURN getRows( qulonglong *pnRows );
- virtual SQLRETURN doAppend();
- virtual SQLRETURN doClear();
- virtual SQLRETURN doDelete();
- virtual SQLRETURN doExecute();
- virtual SQLRETURN doFirst();
- virtual SQLRETURN doInsert();
- virtual SQLRETURN doLast();
- virtual SQLRETURN doNext();
- virtual SQLRETURN doPrepare( const QString &stringStatement );
- virtual SQLRETURN doPrev();
- virtual SQLRETURN doSeek( qlonglong nRow );
- virtual SQLRETURN doSkip( qlonglong nRows );
+ SQLRETURN doAppend();
+ SQLRETURN doClear();
+ SQLRETURN doDelete();
+ SQLRETURN doExecute();
+ SQLRETURN doFirst();
+ SQLRETURN doInsert();
+ SQLRETURN doLast();
+ SQLRETURN doNext();
+ SQLRETURN doPrepare( const QString &stringStatement );
+ SQLRETURN doPrev();
+ SQLRETURN doSeek( qlonglong nRow );
+ SQLRETURN doSkip( qlonglong nRows );
- virtual bool isValidRow();
- virtual bool isValidRow( qulonglong nRow );
+ bool isValidRow();
+ bool isValidRow( qulonglong nRow );
protected:
- MYSQL_STMT *pstm;
- qulonglong nRow; /* 1 -based (0 as BOS) */
+ MYSQL_STMT *pstm; /* MySQL prepared statement
*/
+ MYSQL_BIND *pbindColumns /* we bind all/any columns of resultset here
*/
+ qulonglong nRow; /* current row (1 - based, 0 is BOF/EOF)
*/
+ QString stringStatement; /* SQL statement as provided to doPrepare()
*/
+
+ SQLRETURN doLoadMetaData(); /* load resultset meta data (IRD)
*/
+ SQLRETURN doLoadMetaDataField( unsigned int nField, MYSQL_FIELD *pField ); /* load
resultset column meta data (IRD) */
};
#endif
| Thread |
|---|
| • Connector/ODBC 5 commit: r42 - MYODBCDes/MYODBCDesLib MYODBCDes/MYODBCDesTest MYODBCDes/include MYODBCRes/MYODBCResLib MYODBCRes/include | pharvey | 17 Jan |