terminalsecurity/SCP/SCPDatabase/src/SCPParamDB.cpp
changeset 5 3f7d9dbe57c8
parent 0 b497e44ab2fc
child 9 57a65a3a658c
equal deleted inserted replaced
4:958eca8527dd 5:3f7d9dbe57c8
   175     HBufC* lSelectQry  = HBufC :: NewLC(KSelectWhereParamId().Length() + 15);
   175     HBufC* lSelectQry  = HBufC :: NewLC(KSelectWhereParamId().Length() + 15);
   176     lSelectQry->Des().Format(KSelectWhereParamId, aParamID);
   176     lSelectQry->Des().Format(KSelectWhereParamId, aParamID);
   177 
   177 
   178     __LEAVE_IF_ERROR(lDBView.Prepare(iParameterDB, TDbQuery(*lSelectQry)));
   178     __LEAVE_IF_ERROR(lDBView.Prepare(iParameterDB, TDbQuery(*lSelectQry)));
   179     __LEAVE_IF_ERROR(lDBView.EvaluateAll());
   179     __LEAVE_IF_ERROR(lDBView.EvaluateAll());
   180     lDBView.FirstL();
   180     if(EFalse == lDBView.FirstL()) {
       
   181         return KErrNotFound;
       
   182     }
   181 
   183 
   182     TInt lRowCount = lDBView.CountL();
   184     TInt lRowCount = lDBView.CountL();
   183 
   185 
   184     if(lRowCount == 0) {
   186     if(lRowCount == 0) {
   185         _SCPDB_LOG(_L("[CSCPParamDB]-> No Rows found for this parameter"));
   187         _SCPDB_LOG(_L("[CSCPParamDB]-> No Rows found for this parameter"));
   210     lSelectQry->Des().Format (KSelectWhereParamIdAppID, aParamID, aApp);
   212     lSelectQry->Des().Format (KSelectWhereParamIdAppID, aParamID, aApp);
   211 
   213 
   212     __LEAVE_IF_ERROR(lDBView.Prepare(iParameterDB, TDbQuery(*lSelectQry)));
   214     __LEAVE_IF_ERROR(lDBView.Prepare(iParameterDB, TDbQuery(*lSelectQry)));
   213     __LEAVE_IF_ERROR(lDBView.EvaluateAll());
   215     __LEAVE_IF_ERROR(lDBView.EvaluateAll());
   214     
   216     
   215     lDBView.FirstL();
   217     if(EFalse == lDBView.FirstL()) {
       
   218         return KErrNotFound;
       
   219     }
   216 
   220 
   217     TInt size(0);
   221     TInt size(0);
   218     TInt lRowCount = lDBView.CountL();
   222     TInt lRowCount = lDBView.CountL();
   219 
   223 
   220     if(lRowCount == 0) {
   224     if(lRowCount == 0) {