Subject | Re: [IBO] IBO with multi-thread |
---|---|
Author | alexandrepires2007 |
Post date | 2006-08-31T00:01:16Z |
Ok, Helen, I need one more help please.
I Put in my thread (in execute) the fallowing codes:
ibSession := TIB_Session.Create(nil);
ibConnection := TIB_Connection.Create(nil);
ibtransacao:=TIB_Transaction.Create(nil);
ibtransacao.IB_Connection:=ibConnection;
ibtransacao.Isolation:=tiCommitted;
ibtransacao.IB_Session:=ibSession;
ibConnection.DatabaseName := 'MYBASE.GDB';
ibConnection.UserName := 'sysdba';
ibConnection.Password := 'masterkey';
ibConnection.SQLDialect:=3;
ibconnection.DefaultTransaction:=ibtransacao;
ibconnection.IB_Session:=ibSession;
ibConnection.Connect;
But this dont work, the program dont can connect. when the line
ibConnection.Connect is executed then program stops
Do you can help me ?
Thx
Alexandre
Brazil
I Put in my thread (in execute) the fallowing codes:
ibSession := TIB_Session.Create(nil);
ibConnection := TIB_Connection.Create(nil);
ibtransacao:=TIB_Transaction.Create(nil);
ibtransacao.IB_Connection:=ibConnection;
ibtransacao.Isolation:=tiCommitted;
ibtransacao.IB_Session:=ibSession;
ibConnection.DatabaseName := 'MYBASE.GDB';
ibConnection.UserName := 'sysdba';
ibConnection.Password := 'masterkey';
ibConnection.SQLDialect:=3;
ibconnection.DefaultTransaction:=ibtransacao;
ibconnection.IB_Session:=ibSession;
ibConnection.Connect;
But this dont work, the program dont can connect. when the line
ibConnection.Connect is executed then program stops
Do you can help me ?
Thx
Alexandre
Brazil
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 06:36 AM 19/08/2006, you wrote:
> >Hi guys,
> >
> >Please I need some help, I will develop a application with
> >multi-thread, and each thread will to have access the database but i
> >dont know how make multi-thread conections with IBO.
> >Which components I must create in runtime?
> >
> >Please somebody help me .
>
> One named IB_Session: CREATE THIS FIRST
> 1 or more IB_Connections (one per database)
> All data access objects required, with their IB_Connection property
> set to one of these connection objects
> All controls using these data access objects
>
> Set the IB_Session property of all other components in the thread to
> be the IB_Session created for this thread
>
> >Delpi 7 with IBO 4.2
>
> Helen
>