Subject Re: [ib-support] load map of gds32.dll
Author Paul Reeves
Dieter Raith wrote:
> I get a Exception EAccessviolation in gds32.dll using API call
> isc_dsql_prepare()


> I use an IBPhoenix Document - Programming with the Interbase API,
> which has a Pascal example. In procedure ready_statement
> isc_dsql_prepare() is called. The pointer to the XSQLDA is set to
> NIL. Everyone can imagine what happens if that pointer is used. If my
> above asumption is true that the error happens in isc_to_sqlda it is
> illegal to set this pointer to NIL! In this case the example is
> wrong!

I'm not familiar with the document you mention, but it certainly does
seem wrong. isc_dsql_prepare does need an XSQLDA, although it does not
need to have memory allocated to store XSQLVARs. Try declaring a
temporary XSQLDA and initialising it like this:

var TempDataArea XSQLDA;

TempDataArea.Version := SQLDA_VERSION1;

> It is also very difficult to find the right place in the source code.
> Plenty defines entry point mapping etc etc do not help an ordinary
> user. I hope GDS_DSQL_PREPARE() is the right place to look.

Forget about the source. It is a complete diversion. Developers have
been programming to the API for over ten years without access to the

All the major ports of Delphi drivers - IBObjects, FIB (and its the
derivatives) were done with just the C based API manual. You now have
the luxury of well tested Object Pascal code that works with the API.
I'd recommend digging through the IBX code for the API calls and see how
they have been handled there.


Paul Reeves
Supporting users of Firebird and InterBase