Obtains a sampling of data for all views on a connection.
SMC_RETURN_CODE smc_refresh_ex (SMC_CONNECT_ID clientId, SMC_SIZET step)
identifies the connection.
during playback in a Historical Server connection, allows skipping ahead a specified number of samples. Ordinarily, on playback, step is +1 to retrieve the next sample (negative step values are not allowed).
Does not apply for live connections; use SMC_UNUSED.
Return value |
Indicates |
---|---|
SMC_RET_SUCCESS |
Function succeeded. |
SMC_RET_FAILURE |
Function failed. |
SMC_RET_INVALID_CONNECT |
Connection does not exist. |
This example assumes that:
You have created a connection and have a clientId.
You have created at least one view on that connection.
if (smc_refresh_ex(clientId,SMC_UNUSED) != SMC_RET_SUCCESS) { printf("smc_refresh_ex failed\n"); /* do some cleanup */ }
In a playback session, smc_refresh_ex must be preceded by a call to smc_initiate_playback.
If you try to refresh a view at the same time someone creates a database, the refresh may fail.
A refresh for a view may fail if one or more databases on Adaptive Server are in single-user mode.
Mode |
Availability |
---|---|
SMC_SERVER_M_LIVE |
Yes |
SMC_SERVER_M_HISTORICAL |
Yes (for playback) |
Error |
Indicates |
---|---|
SMC_RET_INVALID_API_FUNCTION |
Invalid use of obsolete and replacement functions in program. |
SMC_RET_INVALID_SVR_MODE |
Invalid server mode. |
smc_connect_ex