sqldelrow() — Delete Row at Open Cursor

Deletes the row at the current position of an open cursor. This function supports the static EXEC SQL DELETE FROM...WHERE CURRENT OF... (positioned DELETE) statement. If you precompile the statement, the preprocessor generates the r-code file to run it.

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

SYNTAX
int
sqldelrow ( sqln, flag, prcfile )
  SQLRQHDL  *sqln;    /* INPUT */
  int       flag;    /* INPUT */
  char       *prcfile;  /* INPUT */ 

sqln

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

flag

An execution flag that ESQL initializes.

prcfile

A pointer to the name of the precompiled r-code file. If the statement is not precompiled, the argument resolves to a null string.

EXAMPLE

This example deletes the row at the current position of cursor x (associated with request handle sql0):

#include "proesql.h"
static SQLRQHDL *sql0 = (SQLRQHDL *) 0;
            .
            .
            .
/* EXEC SQL delete from customer where current of x; */
{
    sqlcdbind(&SQLCODE, (char *)0);
    sqldelrow(sql0,(int)0x010,"");
    if (SQLCODE < 0) goto err;
} 

SEE ALSO

sqldynrq() — Execute a Dynamic Non-SELECT Statement for executing dynamic ESQL positioned DELETE statements, sqlrequest() — Execute a Static ESQL Statement for executing non-positional static ESQL statements, sqlupdrow() — Update Row at Open Cursor for executing static positioned UPDATE statements.


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