// list all OIDs from yesterday with test_status
t = 86400; // 86400 sec/day
date = gmtime(&t);
res = hc_pstmt_set_date(pstmt, 1, date);
res = hc_pstmt_query_ez(pstmt, selects, 1, 2000, &rset);
while (1) {
hc_oid oid;
hc_nvr_t *nvr int finished;
hc_string_t test_status;
res = hc_qrs_next_ez(rset, &oid, &nvr, &finished);
if (finished)
break;
res = hc_nvr_get_string(nvr, "test_status", &test_status);
printf("yesterday’s oid & test_status: %s %s\n ", oid, test_status);
hc_nvr_free(nvr);
}
res = hc_qrs_free(rset);
Deleting Records
The following function is dened to delete records: “hc_delete_ez” on page 111.
hc_delete_ez
Deletes the metadata record for specied OID.
Synopsis
hcerr_t hc_delete_ez(hc_session_t *session,
hc_oid *oid);
Description
This function deletes the metadata record for the specied OID. When the last metadata record
associated with a data object is deleted, the underlying data object is also deleted.
QueryingWithaPreparedStatement
Chapter3 • SunStorageTek 5800SystemCClient API 111