Modified:
trunk/SDK/MYSQLPlus/Library/MResultRes.cpp
Log:
Merged
Modified: trunk/SDK/MYSQLPlus/Library/MResultRes.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MResultRes.cpp 2006-11-28 14:44:01 UTC (rev 699)
+++ trunk/SDK/MYSQLPlus/Library/MResultRes.cpp 2006-11-28 14:51:56 UTC (rev 700)
@@ -293,99 +293,6 @@
}
- This call is used to support doExecute. This call also supports doParamData
- for case when a bound parameter is SQL_LEN_DATA_AT_EXEC.
-
- \param pStateExecute Ref. to a viable MStateExecute.
-
- \return SQLRETURN
-
- \retval SQL_SUCCESS
- \retval SQL_SUCCESS_WITH_INFO
- \retval SQL_NEED_DATA
- \retval SQL_ERROR
-*/
-SQLRETURN MResultRes::doSubmitCommand( MStateExecute *pStateExecute, SQLPOINTER pValue )
-{
- MYODBCDbgEnter();
-
- SQLRETURN nReturn = SQL_SUCCESS;
- SQLRETURN nReturnInternal;
-
- /*!
- \internal ODBC RULE
- \todo
-
- SQLBindParameter was called with ParameterValuePtr set to a null pointer,
StrLen_or_IndPtr not set to SQL_NULL_DATA
- or SQL_DATA_AT_EXEC, and InputOutputType not set to SQL_PARAM_OUTPUT, so that the
number of parameters specified in
- SQLBindParameter was greater than the number of parameters in the SQL statement
contained in *StatementText.
- */
- /* Insert any parameters */
- while ( pStateExecute->nCommandSegment <
pStateExecute->stringlistCommandSegments.count() )
- {
- /* parameter marker? */
- if ( pStateExecute->stringlistCommandSegments.at(
pStateExecute->nCommandSegment ) == "?" )
- {
- pStateExecute->statePutData.doClear();
- pStateExecute->statePutData.pDescriptorRecordIPD =
(MDescriptorRecordIPD*)pStateExecute->pDescriptorIPD->getRecord( 1 +
pStateExecute->nParameterFirst + pStateExecute->nParameter );
- pStateExecute->statePutData.pDescriptorRecordAPD =
(MDescriptorRecordAPD*)pStateExecute->pDescriptorAPD->getRecord( 1 +
pStateExecute->nParameterFirst + pStateExecute->nParameter );
-
- SQLINTEGER *pnOctetLengthPtr =
pStateExecute->statePutData.pDescriptorRecordAPD->getOctetLengthPtr();
- /* data-at-exec? If so we need to use doParamData & doPutData. */
- if ( MYODBCCIsDataAtExec( pnOctetLengthPtr ) )
- {
- /* called by doExecute etc? If so defer to doParamData (which will bring
us back to here). */
- if ( pStateExecute->nPrevCall == MStateExecute::PREV_CALL_NONE )
- MYODBCDbgReturn( SQL_NEED_DATA );
-
- /* called by doParamData *after* doPutData? If so we have data to get
into stringCommand. */
- if ( pStateExecute->nPrevCall == MStateExecute::PREV_CALL_PUT_DATA )
- ;
- else if ( pStateExecute->nPrevCall ==
MStateExecute::PREV_CALL_PUT_DATA )
- ;
- else
- MYODBCDbgReturn( getDiagnostic()->doAppend(
MDiagnostic::STATE_07006 ) );
- MYODBCDbgReturn( SQL_NEED_DATA );
-
- }
- else
- {
- nReturnInternal = fromC( &pStateExecute->statePutData );
- switch ( nReturnInternal )
- {
- case SQL_SUCCESS:
- break;
- case SQL_SUCCESS_WITH_INFO:
- nReturn = nReturnInternal;
- break;
- case SQL_ERROR:
- default:
- doStateRollBack( STATE_INITIALIZED );
- MYODBCDbgReturn( nReturnInternal );
- }
-# if MYODBC_DBG > 1
- MYODBCDbgInfo( QString( "variantData.isNull=%1" ).arg(
pStateExecute->statePutData.variantData.isNull() ) );
- MYODBCDbgInfo( QString( "variantData=%1" ).arg(
pStateExecute->statePutData.variantData.toString() ) );
-# endif
- pStateExecute->nParameter++;
- }
-
- pStateExecute->stringCommand +=
pStateExecute->statePutData.variantData.toString();
- }
- else
- /* plain statement segment */
- pStateExecute->stringCommand +=
pStateExecute->stringlistCommandSegments.at( pStateExecute->nCommandSegment );
-
- pStateExecute->nCommandSegment++;
-
- } // while segments
-
- /* All parameters have been resolved so submit command to server... */
- nReturn = doSubmitCommand( pStateExecute->stringCommand );
-
- MYODBCDbgReturn( nReturn );
-}
-
/*!
\brief Submits command to the server.
| Thread |
|---|
| • Connector/ODBC 5 commit: r700 - trunk/SDK/MYSQLPlus/Library | pharvey | 28 Nov |