Subject | Re: [IBO] FW: Stack overflow error |
---|---|
Author | Helen Borrie (TeamIBO) |
Post date | 2002-04-17T14:28:11Z |
At 02:30 PM 17-04-02 +0200, you wrote:
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;
var
length: word;
APtr: Pointer;
begin
// 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,
Addr(APtr),
SizeOf( Pointer ),
length ));
Result := APtr;
end;
Assign APtr to the dbHandleShared property of the TIBODatabase...
..
var
BDEPtr: isc_db_handle;
begin
...
BDEPtr := GetNativeHandle(MyTDatabase);
if BDEPtr <> nil then
MyIBODatabase.dbHandleShared := BDEPtr
else
<fix up your code so the TDatabase connects first>
...
end;
regards,
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
www.ibobjects.com
>We work on a project written in Delphi5, using Infopower2000 andNot without a lot more information. However, as a general observation,
>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?
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;
var
length: word;
APtr: Pointer;
begin
// 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,
Addr(APtr),
SizeOf( Pointer ),
length ));
Result := APtr;
end;
Assign APtr to the dbHandleShared property of the TIBODatabase...
..
var
BDEPtr: isc_db_handle;
begin
...
BDEPtr := GetNativeHandle(MyTDatabase);
if BDEPtr <> nil then
MyIBODatabase.dbHandleShared := BDEPtr
else
<fix up your code so the TDatabase connects first>
...
end;
regards,
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
www.ibobjects.com