Subject | Re: [ib-support] Questions about Firebird's API |
---|---|
Author | SD@topol.udm.net |
Post date | 2002-03-14T05:52:23Z |
On 13 Mar 2002 at 15:48, C R Zamana wrote:
successful. To tell the truth I didn't do it in Linux, but I hope API
isn't different between platforms.
don't, commit/rollback will close all cursors automatically.
Commit/rollback retaining won't.
You don't need to drop the statement handle if you plan to use the
statement later. A statement handle exists and is valid until
disconnect. It will be freed automatically if you used
isc_dsql_alloc_statement2().
header and an array of XSQLVARs. They must be placed in one
continuous memory area and have to be allocated and deallocated as a
single whole.
documentation, the client library doesn't allocate or free it
automatically. You should allocate memory for buffers and, of course,
free it after using.
SY, Dimitry Sibiryakov.
> Some questions about Firebird's API:I didn't work with API a lot, but my first attempts were mostly
successful. To tell the truth I didn't do it in Linux, but I hope API
isn't different between platforms.
>1) What is the correct sequence to finish a transaction usingYou should use isc_dsql_free_statement with DSQL_close. But if you
>the functions below?
>
>isc_dsql_free_statment()
don't, commit/rollback will close all cursors automatically.
Commit/rollback retaining won't.
You don't need to drop the statement handle if you plan to use the
statement later. A statement handle exists and is valid until
disconnect. It will be freed automatically if you used
isc_dsql_alloc_statement2().
>2) Freeing the osqlda structure automagically freesIf osqlda means XSQLDA then they are ONE structure - a little
>the osqlda->sqlvar structure too?
header and an array of XSQLVARs. They must be placed in one
continuous memory area and have to be allocated and deallocated as a
single whole.
>3) How should I handle the osqlda->sqlvar->sqldata thatAn sqldata is a pointer to your buffer. In spite of IB's beta
>was previously allocated? Should I free them one by one?
documentation, the client library doesn't allocate or free it
automatically. You should allocate memory for buffers and, of course,
free it after using.
SY, Dimitry Sibiryakov.