The following is a pseudo-code example of how an application can retrieve data stored in Oracle Rdb lists using list cursors. The file SQRDB.H included on the installation disk contains the driver specific constants used in the SQLSetConnectOption and SQLSetStmtOption calls. /* Connect to data source */ SQLAllocEnv(&henv) SQLAllocConnect(henv, &hdbc) SQLConnect(hdbc, ...) /* Turn off auto-commit */ SQLSetConnectOption(hdbc, SQL_AUTOCOMMIT, FALSE) /* Specify that the application will use list cursors for blob access */ SQLSetConnectOption(hdbc, SQRDB_BLOB_ACCESS, SQRDB_BLOB_ACCESS_WITH_LISTS) /* Open a cursor on the table EMP */ SQLAllocStmt(hdbc, &hstmt1) SQLSetCursorName(hstmt1, "C1", SQL_NTS) SQLExecDirect( hstmt1, "select EMP_ID, ADDRESS from EMP", SQL_NTS) /* Have fetch return the data as a character string */ SQLBindCol(hstmt1, 1, SQL_C_CHAR, ...) /* Fetch one row from table EMP */ SQLFetch(hstmt1); /* Open a cursor on the ADDRESS column of table EMP */ SQLAllocStmt(hdbc, &hstmt2) SQLSetStmtOption(hstmt2, SQRDB_CURSOR_TYPE, SQRDB_CURSOR_READ) SQLSetStmtOption(hstmt3, SQRDB_LIST_LEN, 65513) SQLExecDirect( hstmt2, "select ADDRESS where current of C1", SQL_NTS) /* The datatype must be set to BINARY, this will cause the driver to */ /* return the data in whatever form it is stored in the database, */ /* i.e. character data will be returned as character data. */ SQLBindCol(hstmt2, 1, SQL_C_BINARY, ...) /* Fetch the segments from the ADDRESS column of table EMP */ while (SQLFetch(hstmt2) == SQL_SUCCESS) /* End the transaction */ SQLTransact(henv, hdbc, SQL_ROLLBACK)