Subject Re: [IBO] Problem with TIBODatabase
Author Helen Borrie
At 08:33 AM 21/06/2005 +0200, you wrote:
>Hi all
>
>
>
>I've got a problem with TIBODatabase. One time I have a TIB_Connection
>and one time a TIBODatabase. I do both time the same as below.
>
>
>
>IB_Connection1.Disconnect;
>
>IB_Connection1.Path := sDest;
>
>IB_Connection1.Username := 'sysdba';
>
>IB_Connection1.Password := 'masterkey';
>
>IB_Connection1.Connect;
>
>
>
>IBODatabase1.Disconnect;
>
>IBODatabase1.Path := sDest;
>
>IBODatabase1.Username := 'sysdba';
>
>IBODatabase1.Password := 'masterkey';
>
>IBODatabase1.Connect;


>But with TIBODatabase I get following error: Cannot open file "". The
>system cannot find the path specified.

Have you checked whether sDest has anything in it on the problem machine?
If you are sure about it, then try modifying your connection setup, as follows:

with IBODatabase1 do
begin
if Connected then
try
Disconnect;
except
// handle the exception as appropriate
end;
if not Connected then
begin
DataBaseName := nil;
Params.Clear;
Server := sServer; // name of server's network node
Path := sDest; // should be absolute path as seen on the host server
Protocol := cpTCP_IP; // or cpNetBeui
Username := 'sysdba';
Password := 'masterkey';
Connect;
end;
end;

The format of the Path string has to be correct for the protocol.

>Problem is, that it works on my pc... but not on the customer pc.

It is not clear *what* works on your pc. For example, are you doing a
local connection on your pc, while the customer is doing a remote one? Are
you simply connecting and disconnecting, while your customer is trying to
disconnect while a transaction is busy? Or what?

Note that Disconnect won't work if the client program is still executing a
query. This includes the case where you opened a large dataset and there
are still rows waiting to be fetched from the server.

Helen