Example: lrd_open_cursor

In the following example, a cursor is opened after a connection is made with an Oracle server. An SQL statement is executed using the cursor.

lrd_open_connection(&Con1, LRD_DBTYPE_ORACLE, "fred", "lion", "hammer", "", 0, 0, 0);
lrd_open_cursor(&Csr1, Con1, 0);
. . . 
lrd_stmt(Csr1, "select ename\nfrom emp\nwhere job='CLERK'\n\n", -1, 1, 1, 0);
lrd_bind_col(Csr1, 1, &D11_ENAME, 0);
lrd_exec(Csr1, 0, 0, 0, 0);
lrd_fetch(Csr1, -4, 15, 0, PrintRow16, 0);
lrd_commit(Con1, 0);