Subject | Re: [Firebird-Architect] Re: C API Upgrade? |
---|---|
Author | Vitaly Prapirny |
Post date | 2008-02-01T10:08:33Z |
Ivan Prenosil wrote:
name = isc_dsql_get_name(xsqlda, col);
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
> > char *isc_dsql_get_name(XSQLDA *xsqlda, unsigned short colno)But this is more clear and omits dependence from XSQLDA internals:
>
> 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)
name = isc_dsql_get_name(xsqlda, col);
>But this is more clear and omits dependence from XSQLDA internals:
> > 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
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