Hi

The Pro *C development guide has an example of sqlgls function which returns the most recent sql statement executed.

regards
Hrishy