Subject | Re: [IBO] AVs in gds32.dll |
---|---|
Author | Helen Borrie |
Post date | 2001-09-28T14:03:03Z |
At 02:35 PM 28-09-01 +0200, you wrote:
Another question - is [id] completely unique at the time the session and database are created? If not, and, the Session (which has no owner) has not been destroyed, what happens when a user tries to instantiate the module using the same [id] ??
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>We do not use DataModules, but the session and database components areHow is this session getting destroyed?
>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
> FSession := TIB_Session.Create(nil); <----------------------------------------------------
Another question - is [id] completely unique at the time the session and database are created? If not, and, the Session (which has no owner) has not been destroyed, what happens when a user tries to instantiate the module using the same [id] ??
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________