Modified:
MYSQLPlus/MYSQLPlusLib/MStatement.cpp
MYSQLPlus/include/MStatement.h
Log:
Modified: MYSQLPlus/MYSQLPlusLib/MStatement.cpp
===================================================================
--- MYSQLPlus/MYSQLPlusLib/MStatement.cpp 2006-05-09 15:41:15 UTC (rev 210)
+++ MYSQLPlus/MYSQLPlusLib/MStatement.cpp 2006-05-09 16:06:13 UTC (rev 211)
@@ -659,7 +659,7 @@
MYODBCDbgReturn( SQL_SUCCESS );
}
-SQLRETURN MStatement::doBindParameter( SQLUSMALLINT nParameterNumber, SQLSMALLINT
nInputOutputType, SQLSMALLINT nValueType, SQLSMALLINT nParameterType, SQLUINTEGER
nColumnSize, SQLSMALLINT nDecimalDigits, SQLPOINTER pParameterValuePtr, SQLINTEGER
nBufferLength, SQLINTEGER *pnStrLenOrInd )
+SQLRETURN MStatement::doBindParameter( SQLUSMALLINT nParameterNumber, SQLSMALLINT
nInputOutputType, SQLSMALLINT nValueType, SQLSMALLINT nParameterType, SQLUINTEGER
nColumnSize, SQLSMALLINT nDecimalDigits, SQLPOINTER pParameterValue, SQLINTEGER
nBufferLength, SQLINTEGER *pnStrLenOrInd )
{
MYODBCDbgEnter();
@@ -724,7 +724,7 @@
The argument ParameterValuePtr was a null pointer, the argument StrLen_or_IndPtr
was a null pointer, and the argument InputOutputType was not SQL_PARAM_OUTPUT.
*/
- if ( !nParameterValuePtr && !pnStrLenOrIndPtr && nInputOutputType !=
SQL_PARAM_OUTPUT )
+ if ( !pParameterValue && !pnStrLenOrInd && nInputOutputType !=
SQL_PARAM_OUTPUT )
MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_HY009 ) );
/*!
@@ -733,7 +733,7 @@
SQL_PARAM_OUTPUT, where the argument ParameterValuePtr was a null pointer, the
C-type was char or binary, and the BufferLength (cbValueMax) was greater than 0.
*/
- if ( nInputOutputType == SQL_PARAM_OUTPUT && !nParameterValuePtr && (
isCharTypeC( nValueType ) || isBinTypeC( nValueType ) ) && nBufferLength > 0 )
+ if ( nInputOutputType == SQL_PARAM_OUTPUT && !nParameterValue && (
isCharTypeC( nValueType ) || isBinTypeC( nValueType ) ) && nBufferLength > 0 )
MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_HY009 ) );
/*!
@@ -947,7 +947,7 @@
Factor in the ODBC rules found in the spec.
*/
- nReturn = pAppParamDesc->setDescField( nParameterNumber, SQL_DESC_OCTET_LENGTH,
(SQLPOINTER)nBufferLen, SQL_IS_INTEGER );
+ nReturn = pAppParamDesc->setDescField( nParameterNumber, SQL_DESC_OCTET_LENGTH,
(SQLPOINTER)nBufferLength, SQL_IS_INTEGER );
switch ( nReturn )
{
case SQL_SUCCESS:
@@ -968,9 +968,9 @@
Factor in the ODBC rules found in the spec.
*/
- if ( pnStrLenOrIndPtr && *pnStrLenOrIndPtr > 0 )
+ if ( pnStrLenOrInd && *pnStrLenOrInd > 0 )
{
- nReturn = pAppParamDesc->setDescField( nParameterNumber,
SQL_DESC_INDICATOR_PTR, pnStrLenOrIndPtr, SQL_IS_POINTER );
+ nReturn = pAppParamDesc->setDescField( nParameterNumber,
SQL_DESC_INDICATOR_PTR, pnStrLenOrInd, SQL_IS_POINTER );
switch ( nReturn )
{
case SQL_SUCCESS:
@@ -995,7 +995,7 @@
}
else
{
- nReturn = pAppParamDesc->setDescField( nParameterNumber,
SQL_DESC_OCTET_LENGTH_PTR, pnStrLenOrIndPtr, SQL_IS_POINTER );
+ nReturn = pAppParamDesc->setDescField( nParameterNumber,
SQL_DESC_OCTET_LENGTH_PTR, pnStrLenOrInd, SQL_IS_POINTER );
switch ( nReturn )
{
case SQL_SUCCESS:
@@ -1025,7 +1025,7 @@
We want to set this value last, as long as we are using MYODBCDrvSetDescField
to set the value, because this will cause a deeper validation.
*/
- nReturn = pAppParamDesc->setDescField( nParameterNumber, SQL_DESC_DATA_PTR,
nParameterValuePtr, SQL_IS_POINTER );
+ nReturn = pAppParamDesc->setDescField( nParameterNumber, SQL_DESC_DATA_PTR,
nParameterValue, SQL_IS_POINTER );
switch ( nReturn )
{
case SQL_SUCCESS:
@@ -1056,9 +1056,53 @@
{
MYODBCDbgEnter();
- pDiagnostic->doClear();
+ /*!
+ \internal ODBC RULE
- MYODBCDbgReturn( SQL_ERROR );
+ After any call to the function that returns SQL_STILL_EXECUTING, an application
+ can call SQLCancel to cancel the function.
+ */
+ if ( isAsyncInProgress() )
+ {
+ /*!
+ \internal MYODBC RULE
+
+ We do not support asynchronous processing at this time (so we should never
+ get here).
+ */
+ MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_IM001 ) );
+ }
+
+ /*!
+ \internal ODBC RULE
+
+ After SQLExecute or SQLExecDirect returns SQL_NEED_DATA and before data has
+ been sent for all data-at-execution parameters, an application can call
+ SQLCancel to cancel the statement execution.
+ */
+ if ( isDataNeeded() )
+ {
+ /*!
+ \internal
+ \todo
+
+ Need to roll-back state and cleanup any temp storage etc. See state
+ transition tables in spec.
+ */
+ MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_IM001 ) );
+ }
+
+ /*!
+ \internal ODBC RULE
+ \todo
+
+ In a multithread application, the application can cancel a function that is
+ running synchronously on a statement. To cancel the function, the application
+ calls SQLCancel with the same statement handle as that used by the target
+ function, but on a different thread.
+ */
+
+ MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_IM001 ) );
}
SQLRETURN MStatement::doCloseCursor()
Modified: MYSQLPlus/include/MStatement.h
===================================================================
--- MYSQLPlus/include/MStatement.h 2006-05-09 15:41:15 UTC (rev 210)
+++ MYSQLPlus/include/MStatement.h 2006-05-09 16:06:13 UTC (rev 211)
@@ -44,7 +44,7 @@
/* doers */
SQLRETURN doBindCol( SQLUSMALLINT nColumnNumber, SQLSMALLINT nTargetType, SQLPOINTER
pTargetValuePtr, SQLINTEGER nBufferLength, SQLLEN *pnStrLenOrInd );
- SQLRETURN doBindParameter( SQLUSMALLINT nParameterNumber, SQLSMALLINT
nInputOutputType, SQLSMALLINT nValueType, SQLSMALLINT nParameterType, SQLUINTEGER
nColumnSize, SQLSMALLINT nDecimalDigits, SQLPOINTER pParameterValuePtr, SQLINTEGER
nBufferLength, SQLINTEGER *pnStrLenOrIndPtr );
+ SQLRETURN doBindParameter( SQLUSMALLINT nParameterNumber, SQLSMALLINT
nInputOutputType, SQLSMALLINT nValueType, SQLSMALLINT nParameterType, SQLUINTEGER
nColumnSize, SQLSMALLINT nDecimalDigits, SQLPOINTER pParameterValue, SQLINTEGER
nBufferLength, SQLINTEGER *pnStrLenOrInd );
SQLRETURN doBulkOperations( SQLSMALLINT nOperation );
SQLRETURN doCancel();
SQLRETURN doCloseCursor();
| Thread |
|---|
| • Connector/ODBC 5 commit: r211 - in MYSQLPlus: MYSQLPlusLib include | pharvey | 9 May |