persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp
branchRCL_3
changeset 15 fcc16690f446
parent 11 211563e4b919
child 23 26645d81f48d
equal deleted inserted replaced
14:04ec7606545c 15:fcc16690f446
   215 void CSqlSrvStatement::BindL(const RSqlBufFlat& aParamBuf)
   215 void CSqlSrvStatement::BindL(const RSqlBufFlat& aParamBuf)
   216 	{
   216 	{
   217 	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
   217 	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
   218 	
   218 	
   219 	(void)sqlite3SymbianLastOsError();//clear last OS error
   219 	(void)sqlite3SymbianLastOsError();//clear last OS error
   220 	if(sqlite3_expired(iStmtHandle))
       
   221 		{
       
   222 		__SQLLEAVE_IF_ERROR(KSqlErrStmtExpired);
       
   223 		}
       
   224 
   220 
   225 	TSqlBufRIterator it;
   221 	TSqlBufRIterator it;
   226 	it.Set(aParamBuf);
   222 	it.Set(aParamBuf);
   227 	TInt prmIdx = 0;
   223 	TInt prmIdx = 0;
   228 	
   224 	
   514 	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
   510 	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
   515 	__SQLASSERT(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), ESqlPanicBadArgument);
   511 	__SQLASSERT(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), ESqlPanicBadArgument);
   516 	__SQLASSERT(aParamIndex < iParamBufArray.Count(), ESqlPanicBadArgument);
   512 	__SQLASSERT(aParamIndex < iParamBufArray.Count(), ESqlPanicBadArgument);
   517 	__SQLASSERT(iParamBufArray[aParamIndex] != NULL, ESqlPanicBadArgument);
   513 	__SQLASSERT(iParamBufArray[aParamIndex] != NULL, ESqlPanicBadArgument);
   518 	(void)sqlite3SymbianLastOsError();//clear last OS error
   514 	(void)sqlite3SymbianLastOsError();//clear last OS error
   519 	if(sqlite3_expired(iStmtHandle))
       
   520 		{
       
   521 		__SQLLEAVE_IF_ERROR(KSqlErrStmtExpired);
       
   522 		}
       
   523 	//Bind the parameter value.
   515 	//Bind the parameter value.
   524 	//SQLITE_STATIC is used as an argument, because the text/blob data will be kept and can be used by the next bind call
   516 	//SQLITE_STATIC is used as an argument, because the text/blob data will be kept and can be used by the next bind call
   525 	HSqlSrvStmtParamBuf& paramBuf = *iParamBufArray[aParamIndex];
   517 	HSqlSrvStmtParamBuf& paramBuf = *iParamBufArray[aParamIndex];
   526 	const TPtrC8 paramData(paramBuf.Data());
   518 	const TPtrC8 paramData(paramBuf.Data());
   527 	SQLPROFILER_REPORT_ALLOC(paramData.Length());
   519 	SQLPROFILER_REPORT_ALLOC(paramData.Length());