Input Descriptors (Embedded SQL Guide)
From InterBase
Go Up to Understanding the XSQLDA (Embedded SQL Guide)
Input descriptors process SQL statement strings that contain parameters. Before an application can execute a statement with parameters, it must supply values for them. The application indicates the number of parameters passed in the XSQLDA
sqld
field, then describes each parameter in a separate XSQLVAR
structure. For example, the following statement string contains two parameters, so an application must set sqld
to 2, and describe each parameter:
char *str = "UPDATE DEPARTMENT SET BUDGET = ? WHERE LOCATION = ?";
When the statement is executed, the first XSQLVAR
supplies information about the BUDGET
value, and the second XSQLVAR
supplies the LOCATION
value.
For more information about using input descriptors, see DSQL Programming Methods.