Subject Re: [IBO] FW: Stack overflow error
Author Helen Borrie (TeamIBO)
At 02:30 PM 17-04-02 +0200, you wrote:
>We work on a project written in Delphi5, using Infopower2000 and
>Multilizer 4.2 connecting to IB6 through BDE.
>I want to evaluate IBO, so I decided to add the TIB_Database component
>(coexisting with the BDE). When I run the application, simply by adding
>this one component, I get "stack overflow" errors, even after increasing
>the min. stack size to $60000 (it used to be $6000).
>Does anyone know what I'm doing wrong?

Not without a lot more information. However, as a general observation,
TIB_Database is not the right choice of connection component to use with
Infopower. Concentrate on using the TIBO* components for now: they are
the ones which inherit the VCL data access architecture.

Tell us what your property settings are for the TIBODatabase, once you
substitute it into your project and get it set up.

This is an example of how you piggyback a TIBODatabase (which inherits from
TIB_Connection) onto a TDatabase's handle:

function GetNativeHandle(Database: TDatabase): Pointer;
length: word;
APtr: Pointer;
// This is how you get a native IB handle out of a TDatabase.
APtr := nil;
if Assigned( Database ) and
Database.Connected and
( Database.DriverName = 'INTRBASE' ) then
Check( DBIGetProp( HDBIOBJ( Database.Handle ), dbNATIVEHNDL,
SizeOf( Pointer ),
length ));
Result := APtr;

Assign APtr to the dbHandleShared property of the TIBODatabase...
BDEPtr: isc_db_handle;
BDEPtr := GetNativeHandle(MyTDatabase);
if BDEPtr <> nil then
MyIBODatabase.dbHandleShared := BDEPtr
<fix up your code so the TDatabase connects first>

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at