Implicit read-only cursor sample program

The csr_disp_implicit.c sample program demonstrates using an implicit read-only cursor:

The program flow is the same as the csr_disp.c sample program, with the only difference being the usage of the CS_IMPLICIT_CURSOR option instead of CS_READ_ONLY in the first ct_cursor call. Although, the generated output is the same as the csr_disp.c example, the use of CS_IMPLICIT_CURSOR potentially reduces network traffic at the network level.

When using this example, it is important to set the CS_CURSOR_ROWS option to a value greater than 1.

This is the canned query:

select au_fname, au_lname, postalcode 
from authors

For more information about this sample program, see the leading comments in the example source file.

NoteThis example requires Adaptive Server version 12.5.1 or later and the pubs2 database.