I see the following code fragment in a legacy application that accesses Informix through C. Can anyone explain what the SQL in the code is trying to achieve? Thanks.
EXEC SQL BEGIN DECLARE SECTION;
int i_tableref;
EXEC SQL END DECLARE SECTION;
/* Some code here */
if (!i_sel_ref)
{
exec sql begin declare section;
const char *sql1 =
"select refer_num.nextval from table ( SET{''} )";
exec sql end declare section;
exec sql prepare oref_sel_fid from :sql1;
if ( sqlca.sqlcode != SQL_OK )
{
/* some code */
}
/* More code */
}