phonebookengines/contactsmodel/cntplsql/src/cntsqlprovider.cpp
changeset 24 0ba2181d7c28
parent 0 e686773b3f54
child 25 76a2435edfd4
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 /*
     2 // All rights reserved.
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // This component and the accompanying materials are made available
     3 * All rights reserved.
     4 // under the terms of "Eclipse Public License v1.0"
     4 * This component and the accompanying materials are made available
     5 // which accompanies this distribution, and is available
     5 * under the terms of "Eclipse Public License v1.0"
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 * which accompanies this distribution, and is available
     7 //
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 // Initial Contributors:
     8 *
     9 // Nokia Corporation - initial contribution.
     9 * Initial Contributors:
    10 //
    10 * Nokia Corporation - initial contribution.
    11 // Contributors:
    11 *
    12 //
    12 * Contributors:
    13 // Description:
    13 *
    14 //
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
    15 
    18 
    16 /**
    19 /**
    17  @file
    20  @file
    18  @internalComponent
    21  @internalComponent
    19  @released
    22  @released
   326 sql condition.
   329 sql condition.
   327 
   330 
   328 */	
   331 */	
   329 void CCntSqlStatement::Reset()
   332 void CCntSqlStatement::Reset()
   330 	{
   333 	{
   331 	if(iCondition)
   334 	delete iCondition;	
   332 		{
   335 	iCondition = NULL;
   333 		delete iCondition;	
   336 	
   334 		iCondition = NULL;
       
   335 		}
       
   336 		
       
   337 	delete iSqlString;
   337 	delete iSqlString;
   338 	iSqlString = NULL;
   338 	iSqlString = NULL;
   339 		
   339 		
   340 	iParams->Reset();
   340 	iParams->Reset();
   341 	iValues->Reset();	
   341 	iValues->Reset();	
   385 		iValues->Reset();
   385 		iValues->Reset();
   386 		delete iValues;		
   386 		delete iValues;		
   387 		}
   387 		}
   388 	}
   388 	}
   389 	
   389 	
       
   390 void CCntSqlStatement::SetTableName(HBufC* aTableName)
       
   391     {
       
   392     delete iTableName;
       
   393     iTableName = aTableName;
       
   394     
       
   395 	// Table name changes, so SQL statement must be re-generated
       
   396     iProcessed = EFalse;
       
   397 	delete iSqlString;
       
   398 	iSqlString = NULL;
       
   399     }
       
   400 
   390 /**
   401 /**
   391 Creates a concrete CCntSqlUpdate object (used to retrieve sql update statements)
   402 Creates a concrete CCntSqlUpdate object (used to retrieve sql update statements)
   392 
   403 
   393 @param aTableName table name against which update statement will be run
   404 @param aTableName table name against which update statement will be run
   394 
   405