Subject Re: [IBO] IBO with multi-thread
Author Robert martin
Hi, my names not Helen but I might be able to help :)

Try...

ibSession := TIB_Session.Create(nil);
ibConnection := TIB_Connection.Create(*ibSession*); //Changed
ibtransacao:=TIB_Transaction.Create(*ibSession*); //Changed

ibtransacao.IB_Connection:=ibConnection;
ibtransacao.Isolation:=tiCommitted;
ibtransacao.IB_Session:=ibSession;

ibConnection.DatabaseName := 'MYBASE.GDB';
ibConnection.UserName := 'sysdba';
ibConnection.Password := 'masterkey';

ibConnection.Protocol = cpTCP_IP; //New

ibConnection.SQLDialect:=3;
ibconnection.DefaultTransaction:=ibtransacao;
ibconnection.IB_Session:=ibSession;
ibConnection.Connect;


You should specify Path and Server instead of DatabaseName. I not your
example databasename has no path info in it.

This may not be everthing but it should give you a good start.

Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com

Wild Software Ltd



alexandrepires2007 wrote:
> 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
>
>
>