OCILIB (C and C++ Driver for Oracle)  4.1.0
Oracle Rowids

OCILIB supports the Oracle ROWID type through C scalar string types (otext).

The maximum size of an ROWID buffer is defined by the constant OCI_SIZE_ROWID

Example
#include "ocilib.h"
int main(void)
{
OCI_Statement *st1, *st2;
char rowid[OCI_SIZE_ROWID+1];
int value;
if (!OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT))
return EXIT_FAILURE;
cn = OCI_ConnectionCreate("db", "usr", "pwd", OCI_SESSION_DEFAULT);
OCI_Prepare(st1, "update test_fetch set code = :i where rowid = :s");
OCI_BindInt(st1, ":i", &value);
OCI_BindString(st1, ":s", rowid, sizeof(rowid)-1);
OCI_ExecuteStmt(st2, "select code, rowid from test_fetch for update");
rs = OCI_GetResultset(st2);
while (OCI_FetchNext(rs))
{
value = OCI_GetInt(rs, 1);
strcpy(rowid, OCI_GetString(rs, 2));
/* updating value with some computation ... */
value = (value + 4 ) % 2;
}
return EXIT_SUCCESS;
}