Returns the number of rows returned by a given view after a refresh.
SMC_RETURN_CODE smc_get_row_count (SMC_CONNECT_ID clientId, SMC_VIEW_ID viewId, SMC_SIZETP rowCountHandle)
identifies the connection.
identifies a view created on the connection.
pointer to a variable into which Monitor Client Library writes the number of rows in a view.
Return value |
Indicates |
---|---|
SMC_RET_SUCCESS |
Function succeeded. |
SMC_RET_FAILURE |
Function failed. |
SMC_RET_INVALID_CONNECT |
Connection does not exist. |
The following example assumes that:
You have created a connection and have a clientId.
You have created a view on that connection and have a viewId.
You have successfully executed a refresh call.
SMC_SIZET rowCount; SMC_SIZETP rowCountHandle = &rowCount;
if (smc_get_row_count(clientId, nviewId, rowCountHandle) != SMC_RET_SUCCESS) { printf("smc_get_row_count failed\n"); /* do some cleanup */ }
The first row of data is indexed by row number 0, the second by 1, and so on.
Mode |
Availability |
---|---|
SMC_SERVER_M_LIVE |
Yes |
SMC_SERVER_M_HISTORICAL |
Yes (during playback) |
Error |
Indicates |
---|---|
SMC_RET_INVALID_VIEWID |
View does not exist. |
smc_refresh_ex, smc_get_dataitem_value