sqldynftch() — Fetch Next Row of Dynamic Cursor

Fetches the next row of a dynamic open cursor. This function supports the dynamic EXEC SQL FETCH... statement sequence.

This function returns normalized values. For more information, see the function return values in the "General Diagnostics" section in this chapter:

SYNTAX
int
sqldynftch ( sqln, psqlda )
  SQLRQHDL        *sqln;      /* INPUT */
  struct SQLDA_T    *psqlda;      /* OUTPUT */ 

sqln

A pointer to the request handle for the open cursor. For more information on request handles, see the "SQL Request Handles" section.

psqlda

The pointer to the SQL descriptor area to receive the column data values. Be sure to allocate data storage for each column in the descriptor area.

NOTE

EXAMPLE

This example fetches the next row of cursor C1 (associated with a cursor specification prepared and opened using request handle sql1) into the SQL descriptor area to which psqlda points:

#include "proesql.h"
static SQLRQHDL *sql1 = (SQLRQHDL *) 0;
            .
            .
            .
/* EXEC SQL FETCH C1 INTO DESCRIPTOR psqlda; */
{
    sqlcdbind(&SQLCODE, (char *)0);
    sqldynftch(sql1,psqlda);
}
if (SQLCODE == 100) break;   /* NOT FOUND means End of Data */ 

SEE ALSO

sqlfetch() — Fetch Next Row of Open Cursor for static fetches, sqldynposfetch() — Fetch Row of Dynamic Open Cursor for positioned fetches.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095