persistentstorage/sql/SRC/Client/SqlStatementImpl.inl
branchRCL_3
changeset 11 211563e4b919
parent 0 08ec8eefde2f
child 23 26645d81f48d
--- a/persistentstorage/sql/SRC/Client/SqlStatementImpl.inl	Thu Apr 01 00:19:42 2010 +0300
+++ b/persistentstorage/sql/SRC/Client/SqlStatementImpl.inl	Wed Apr 14 17:46:32 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -134,6 +134,8 @@
                       ESqlDbError or other system-wide error codes;
         KErrNone      Operation has completed successfully.
 
+@panic SqlDb 7 In _DEBUG mode, invalid column count.
+
 @see CSqlStatementImpl::New()
 */
 template <class DES> TInt CSqlStatementImpl::Construct(CSqlDatabaseImpl& aDatabase, const DES& aSqlStmt)
@@ -143,15 +145,13 @@
 		{
 		return err;	
 		}
-	if(iColumnCnt >= 0)
-		{
-		err = iColumnValueBuf.SetCount(iColumnCnt);
-		if(err != KErrNone)
-			{
-			return err;	
-			}
-		iColumnValBufIt.Set(iColumnValueBuf);
-		}
+    __SQLASSERT(iColumnCnt >= 0, ESqlPanicInternalError);
+    err = iColumnValueBuf.SetCount(iColumnCnt);
+    if(err != KErrNone)
+        {
+        return err;	
+        }
+    iColumnValBufIt.Set(iColumnValueBuf);
 	if(iParamCnt > 0)
 		{
 		err = iParamValueBuf.SetCount(iParamCnt);