Subject Re: [Firebird-Architect] Re: C API Upgrade?
Author Vitaly Prapirny
Ivan Prenosil wrote:
> > char *isc_dsql_get_name(XSQLDA *xsqlda, unsigned short colno)
>
> Do you mean name of the column ? It is stored in xsqlda, just read it.
> In Delphi it is just
>
> Copy(xsqlda.sqlvar[col].sqlname, 1, xsqlda.sqlvar[col].sqlname_length)

But this is more clear and omits dependence from XSQLDA internals:

name = isc_dsql_get_name(xsqlda, col);
>
> > short isc_dsql_get_type(XSQLDA *xsqlda, unsigned short colno)
>
> Type of the column ? You can read it directly from xsqlda, what else is
> such function
> expected to do ? In delphi it is just
>
> xsqlda.sqlvar[col].sqltype and $FFFFFFFE

But this is more clear and omits dependence from XSQLDA internals:

type = isc_dsql_get_type(xsqlda, col);

I don't think that current C API is so impossibly terrible, but I should
agree that some things may be more comfortable even in plain C.

Good luck!
Vitaly