本文整理汇总了C++中RBuf8::AppendFormat方法的典型用法代码示例。如果您正苦于以下问题:C++ RBuf8::AppendFormat方法的具体用法?C++ RBuf8::AppendFormat怎么用?C++ RBuf8::AppendFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RBuf8
的用法示例。
在下文中一共展示了RBuf8::AppendFormat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InsertIntoUriPropsTblL
/**
Inserts the data into the URIPropertiesTbl.
@param aUri URI object
@param [out] aUriId The URI will be filled upon successful insertion. This ID
uniquelly indentifies the URI.
@return Returns the number of rows inserted. Normally 1. Otherwise returns with
system-wide error code.
*/
TInt CUriListInterface::InsertIntoUriPropsTblL ( TInt aUriId, const CInetUriProperties& aUriProps, TInt& aPropId )
{
const TInt KMaxLen = 128;
const TDesC8& propId ( iStringPool.String (URILIST::EPropId,URILIST::Table).DesC() );
aPropId = GetMaxIdValueL ( KUriPropsTblName(), propId ) + 1;
_LIT8 ( KInsertStmt, "INSERT INTO %S VALUES (%d, %d, %d, %d, %d, :V1)");
RBuf8 queryBuf;
CleanupClosePushL (queryBuf);
queryBuf.CreateL ( KMaxLen );
queryBuf.AppendFormat ( KInsertStmt, &(KUriPropsTblName()), aUriId, aPropId, aUriProps.ServiceType(), aUriProps.ListType(), aUriProps.Permission() );
MDBTransaction* dbTrans = iDbAccessor->PrepareTransactionL ( queryBuf );
CleanupStack::PushL ( TCleanupItem ( CUriListInterface::DestroyTransObj, dbTrans ) );
dbTrans->BindTextL ( 0, aUriProps.FavouriteName () ); // Bind with parameter index 0
TInt result = dbTrans->ExecuteL ();
CleanupStack::PopAndDestroy (2); // queryBuf, dbTrans
return result;
}