This tutorial describes how to read the data from the table into a buffer.
This query allows you to retrieve the data in a field. You can retrieve one entry or multiple entries in the same column by executing the query in a loop.
The high level steps to read the data into the buffer are shown here:
The steps to read data to a buffer are as follows:
Configure the SQL statement
Instantiate an RSqlStatement object and declare the variables as required.
Allocate memory and copy data
To retrieve all the entries, use a loop. The steps to be performed within the loop are as described below:
Instantiate an object of the RBuf class.
Allocate enough memory to hold the column data using the CreateL() function as shown below.
Copy the data from the table into the buffer using RSqlStatement::ColumnBinary(TInt,TDes8 &)const function.
Deallocate the memory assigned to the RBuf object.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.