equal
deleted
inserted
replaced
264 //Prepare the sql |
264 //Prepare the sql |
265 TBuf<KCISqlStringMaxLength> sql; |
265 TBuf<KCISqlStringMaxLength> sql; |
266 sql.Format( KCISqlFormatSeek, &aContentName ); |
266 sql.Format( KCISqlFormatSeek, &aContentName ); |
267 |
267 |
268 RSqlStatement stmt; |
268 RSqlStatement stmt; |
269 stmt.Prepare( iDatabase , sql ); |
269 TBool isfound = EFalse; |
270 |
270 //Error check necessary to avoid sqldb 2 panic, |
271 TBool isfound = ( KSqlAtRow == stmt.Next() )?ETrue:EFalse; |
271 //if sqlstatement preparation fails, call to Next() raises this panic |
|
272 TInt err = stmt.Prepare( iDatabase , sql ); |
|
273 if ( err == KErrNone) |
|
274 isfound = ( KSqlAtRow == stmt.Next() )?ETrue:EFalse; |
272 OstTraceFunctionExit0( CCONTENTINFODB_FINDL_EXIT ); |
275 OstTraceFunctionExit0( CCONTENTINFODB_FINDL_EXIT ); |
273 return isfound; |
276 return isfound; |
274 } |
277 } |
275 |
278 |
276 // ----------------------------------------------------------------------------- |
279 // ----------------------------------------------------------------------------- |
288 //Prepare the sql |
291 //Prepare the sql |
289 TBuf<KCISqlStringMaxLength> sql; |
292 TBuf<KCISqlStringMaxLength> sql; |
290 sql.Copy( KSelectAllRowsFormat ); |
293 sql.Copy( KSelectAllRowsFormat ); |
291 |
294 |
292 RSqlStatement stmt; |
295 RSqlStatement stmt; |
293 stmt.Prepare( iDatabase , sql ); |
296 TInt err = stmt.Prepare( iDatabase , sql ); |
294 |
297 //Error check necessary to avoid sqldb 2 panic, |
295 while ( KSqlAtEnd != stmt.Next() ) |
298 //if sqlstatement preparation fails, call to Next() raises this panic |
296 ++count; |
299 if( err == KErrNone) |
297 |
300 { |
|
301 while ( KSqlAtEnd != stmt.Next() ) |
|
302 ++count; |
|
303 } |
298 OstTraceFunctionExit0( CCONTENTINFODB_GETCONTENTCOUNTL_EXIT ); |
304 OstTraceFunctionExit0( CCONTENTINFODB_GETCONTENTCOUNTL_EXIT ); |
299 return count; |
305 return count; |
300 } |
306 } |
301 |
307 |
302 // ----------------------------------------------------------------------------- |
308 // ----------------------------------------------------------------------------- |