|
DM API Online help | |
SQAddCell FunctionThe SQAddCell function adds a single data cell to API data set Syntax void SQAddCell(
const char* sValue
);
Parameters iColumn[in] Index of the column data is added.sValue[in] The value of the data.Return Value The Function returns nothing. Remarks You can use the SQAddCell function to add individual data values to the Data Container. You can think of API data set as a grid that has columns, rows, and cells. To use SQAddCell, you loop on all columns starting with the first column and start adding values for each cell in the column. Example // f is a handle of the text file containing your data//GetValue is your parsing function, to retrieve value from text line giving the separatorCString sLine;int iRows = 0;while( f.ReadString( sLine ) ){iRows++;// show progressfor( i=0; i< iNoCols; i++){// Make sure you are reading the right dataTRACE("[%s] ", GetValue( sLine, i, cSeparator ));SQAddCell( i, GetValue(sLine,i, cSeparator) );}TRACE("\n finished reading");}f.Close(); |
| Copyright © 1996 - 2007 AZMY Thinkware Inc. All rights reserved. |