7. Understanding ODBC Connectivity : ODBC Programming : Fetched Data : SQLSetCursorName()--Declare Cursor
 
Share this page                  
SQLSetCursorName()--Declare Cursor
The term cursor is an acronym for CURrent Set Of Records. A database cursor is similar to the cursor on your computer screen. However, instead of pointing at something on your screen, a database cursor points to a data row set.
Some database vendors make a distinction between client and server-side cursors. However, a cursor declared in an Ingres ODBC program is always a server-side cursor. This means that the properties of the cursor are applied only on the DBMS server of the target database.
An ODBC application can name a cursor directly via a call to SQLSetCursorName():
SQLSetCursorName( hstmt,  /* Statement handle */
    "C1",                 /* Cursor Name */
    SQL_NTS );            /* This is a null-terminated string */
The above code creates a cursor named C1, which is also visible to the DBMS as C1.