SQL Request Handles

Many ESQL-LIB functions take an SQL request handle as a parameter. This request handle references either an open cursor in Static ESQL or a prepared statement in Dynamic ESQL. In Dynamic ESQL, a request handle is also the ESQL-LIB equivalent of a Progress/ESQL statement identifier. ESQL-LIB uses this handle to reference the same SQL object for many calls to the interface. The Preprocessor declares a unique request handle for each Static ESQL cursor and each Dynamic ESQL prepared statement using the following specification:

static SQLRQHDL *sqln = (SQLRQHDL *) 0; 

The n component of the name is an ascending integer starting at zero. SQLRQHDL is defined in proesql.h, the header file located in your ESQL installation directory. If you use ESQL-LIB directly, you must declare your own request handle variables. The contents of a request handle is undefined after a close statement. Although proesql.h defines SQLRQHDL as a pointer to char, the request handle actually references an ESQL internal structure that maintains the state of the prepared statement. It has no meaning to your application.


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