Subject Re: [IBO] AVs in gds32.dll
Author delphi5
We do not use DataModules, but the session and database components are
created before the TIBOQuery component is created. This is the code used to
create the session and database components (id is a unique integer):

if not Assigned(FDatabase) then
begin
s := Format('%x', [id]);
FDatabaseName := 'dbas' + s;

// create session (needed for multi-threading)
FSession := TIB_Session.Create(nil);
FSession.AllowDefaultConnection := true;
FSession.Name := 'sessKZ32_' + s;
FSession.AllowDefaultConnection := false;
FSession.AllowDefaultTransaction := false;

FDatabase := TIBODatabase.CreateForSession(FSession, FSession);
FDatabase.Name := 'dbasKZ32_' + s;
FDatabase.DatabaseName := FDatabaseName;
FDatabase.Protocol := cpTCP_IP;
FDatabase.Server := _server;
FDatabase.Path := _path;
FDatabase.Charset := _charset;
FDatabase.Username := _username;
FDatabase.Password := _password;
FDatabase.KeepConnection := true;
FDatabase.LoginPrompt := False;
FDatabase.AutoCommit := false;
FDatabase.IB_Session := FSession;

FDatabase.Connected := true;
end;

Gyula

"Steve Garland" <sgarland@...> wrote in message
news:9p1b09$o8o$1@......
> <<we are using IBO as the database connection in a heavily multi-threaded
> application. We are using separate TIB_Session and a TIBODatabase for
every
> thread (we need a TDataset compatible IBO dataset, so using TIBOQuery to
> access the tables
>
> 1. is the TIB_Session the first component created on your dataModule (it
> needs to be)
> 2. is the TIB_Connection protcol set to cpTCP_IP ?