Subject | NOT Re: [IBO] IBO with multi-thread |
---|---|
Author | Helen Borrie |
Post date | 2006-08-31T01:47:36Z |
At 11:14 AM 31/08/2006, Rob Martin wrote:
so --
// ibConnection.DatabaseName := 'MYBASE.GDB';
ibConnection.DatabaseName := 'abcde'; // anything friendly
ibConnection.Path := 'D:\Path\To\MYBASE.GDB';
ibConnection.Server := 'localhost';
ibConnection.UserName := 'sysdba';
ibConnection.Password := 'masterkey';
ibConnection.Protocol = cpTCP_IP; //New
Note, if you leave Server, Path and Protocol blank, you can use
DatabaseName (not recommended though) but the entire,
protocol-correct connection string is required, viz.
ibConnection.Path := 'localhost:D:\Path\To\MYBASE.GDB';
Also, if you are using Firebird v.1.5 or higher, it is recommended to
make use of the database aliasing feature. In that case, replace the
Path element with the alias, e.g.
In aliases.conf:
mydb = D:\Path\To\MYBASE.GDB
Then, in IBO:
ibConnection.Path := 'mydb;
Please do not hijack other people's topics !!!
Helen
>Hi, my names not Helen but I might be able to help :)Quite right - except Rob you forgot to include them in your example!
>
>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.
so --
// ibConnection.DatabaseName := 'MYBASE.GDB';
ibConnection.DatabaseName := 'abcde'; // anything friendly
ibConnection.Path := 'D:\Path\To\MYBASE.GDB';
ibConnection.Server := 'localhost';
ibConnection.UserName := 'sysdba';
ibConnection.Password := 'masterkey';
ibConnection.Protocol = cpTCP_IP; //New
Note, if you leave Server, Path and Protocol blank, you can use
DatabaseName (not recommended though) but the entire,
protocol-correct connection string is required, viz.
ibConnection.Path := 'localhost:D:\Path\To\MYBASE.GDB';
Also, if you are using Firebird v.1.5 or higher, it is recommended to
make use of the database aliasing feature. In that case, replace the
Path element with the alias, e.g.
In aliases.conf:
mydb = D:\Path\To\MYBASE.GDB
Then, in IBO:
ibConnection.Path := 'mydb;
Please do not hijack other people's topics !!!
Helen