Subject Using the API
Author ozjazzfan
From the Interbase 6 API Guide - Page 86:

<quote>
Applications do not declare instances of the XSQLVAR ahead of time, but must, instead, dynamically allocate storage for the proper number of XSQLVAR structures required for each DSQL statement before it is executed, then deallocate it, as appropriate, after statement execution.
</quote>

Any reason for this?

If I'm writing an app that only generates SQL that has up to a known max number of params (say up to 10 in and 60 out), why can't I just allocate the max at the beginning of the app and re-use the structures over the lifetime of the app?

Set the sqld and sqln members to the number of params actually used, assign the sqlvar array and away you go...

Or is there something I'm missing?

Cheers