--- a/terminalsecurity/SCP/SCPDatabase/src/SCPParamDB.cpp Tue Feb 02 00:44:00 2010 +0200
+++ b/terminalsecurity/SCP/SCPDatabase/src/SCPParamDB.cpp Fri Feb 19 23:41:35 2010 +0200
@@ -177,9 +177,8 @@
__LEAVE_IF_ERROR(lDBView.Prepare(iParameterDB, TDbQuery(*lSelectQry)));
__LEAVE_IF_ERROR(lDBView.EvaluateAll());
- if(EFalse == lDBView.FirstL()) {
- return KErrNotFound;
- }
+
+ lDBView.FirstL();
TInt lRowCount = lDBView.CountL();
@@ -213,10 +212,8 @@
__LEAVE_IF_ERROR(lDBView.Prepare(iParameterDB, TDbQuery(*lSelectQry)));
__LEAVE_IF_ERROR(lDBView.EvaluateAll());
-
- if(EFalse == lDBView.FirstL()) {
- return KErrNotFound;
- }
+
+ lDBView.FirstL();
TInt size(0);
TInt lRowCount = lDBView.CountL();
@@ -332,8 +329,7 @@
_SCPDB_LOG(_L("[CSCPParamDB]-> WARNING: Nothing to do!!"));
return KErrNone;
}
-
- TInt lAffRows(0);
+
HBufC* lDelQuery(NULL);
if(iParameterDB.InTransaction()) {
@@ -353,7 +349,7 @@
lDelQuery->Des().Format(KDeleteWhereParamIDValueDesAppID, aParamID, &(aParamValues[i])->Des(), aApp);
}
- lAffRows = iParameterDB.Execute(*lDelQuery);
+ TInt lAffRows = iParameterDB.Execute(*lDelQuery);
_SCPDB_LOG(_L("[CSCPParamDB]-> INFO: Total rows affected=%d"), lAffRows);
CleanupStack :: PopAndDestroy();
}
@@ -418,8 +414,7 @@
TInt CSCPParamDB :: DropValuesL(TInt aParamID, const TInt32 aApp) {
_SCPDB_LOG(_L("[CSCPParamDB]-> DropValuesL() >>>"));
-
- TInt lAffRows(0);
+
HBufC* lDelQuery(NULL);
if(iParameterDB.InTransaction()) {
@@ -439,7 +434,7 @@
}
_SCPDB_LOG(_L("[CSCPParamDB]-> SQL Query: %S"), &lDelQuery->Des());
- lAffRows = iParameterDB.Execute(*lDelQuery);
+ TInt lAffRows = iParameterDB.Execute(*lDelQuery);
_SCPDB_LOG(_L("[CSCPParamDB]-> INFO: Total rows affected=%d"), lAffRows);
CleanupStack :: PopAndDestroy();