[Info-ingres] RE: OpenAPI Calling a database procedure
- From: martin.bowes@xxxxxxxxxxxxx
- Date: Wed, 13 Jul 2005 15:51:33 +0100
Hi Grant,
Solved the hang by installing the generic
Parameter values
correctly for the IIapi_query call. Now the program runs to completion
but...
The value returned from the procedure
is 0 and not the 100 it
would be if this procedure was executed from ESQLC.
I use the code...
if (queryInfoParm.gq_mask & IIAPI_GQ_PROCEDURE_RET) {
printf("A returned value was available=%f\n",
queryInfoParm.gq_procedureReturn
);
printf("gq_flags=%x\n", queryInfoParm.gq_flags);
returned_value=queryInfoParm.gq_procedureReturn; /*May not be
reliable*/
};
The gq_flags was 0x80 ie. IIAPI_GQF_TRANSACTION_INACTIVE
I'm wondering if the procedure return status and the value returned by
the procedure using return [return_status] are the same thing?
I note in the SQL Manual:
The optional return_status returns a value to the calling application when the
return statement executes. Return_status must be a non-null integer constant,
variable, or parameter whose data type is comparable with the data type of the
variable to which its value will be assigned. If the return_status is not
specified or if a return statement is not executed, then the procedure returns 0
to the calling application.
In this case the procedure returns an integer variable. I'm assiging this
to a long. I would have thought this would be acceptable.
Marty
- Prev by Date: [Info-ingres] RE: OpenAPI Calling a database procedure
- Next by Date: [Info-ingres] RE: OpenAPI Calling a database procedure
- Previous by thread: [Info-ingres] RE: OpenAPI Calling a database procedure
- Next by thread: [Info-ingres] RE: OpenAPI Calling a database procedure
- Index(es):