About Database path establish set.

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

About Database path establish set.

Post by ibdac1pro » Fri 25 Aug 2006 02:33

IBCConnection1.Database := '.\DATA\TEST.FDB';
IBCConnection1.Connected := True;

Error occurr!
I/O error for file ".\DATA\TEST.FDB"
Error while trying to open file

But this statement is no error.
IBCConnection1.Database := 'C:\Program files\DATA\TEST.FDB';
IBCConnection1.Connected := True;

I want below statement.
IBCConnection1.Database := '.\DATA\TEST.FDB';

Impossible?
If so, please support.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Mon 28 Aug 2006 07:18

Please specify your application path, also you should know that ".\DATA\TEST.FDB" is equal to "\DATA\TEST.FDB". If you need to access database in the parent directory you need to use "..\DATA\TEST.FDB" instead.

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Post by ibdac1pro » Thu 31 Aug 2006 00:23

IBCConnection1.Database := '\DATA\TEST.FDB';
or
IBCConnection1.Database := '..\DATA\TEST.FDB';

Error occurrence, too.
I/O error for file "\DATA\TEST.FDB"
Error while trying to open file.

Please test and reply....

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 31 Aug 2006 06:41

Please specify your application path. To do this place button on the main application form and fill OnClick event with the following code:

Code: Select all

ShowMessage(ExtractFileDir(Application.ExeName));
Also send us small sample project that demonstrates your problem.

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Post by ibdac1pro » Sat 02 Sep 2006 07:37

Application path: c:\program files
Data path: c:\program files\DATA

How set relation path?
ex)
IBCConnection1.Database := '.\DATA\TEST.FDB';

Please reply.
We are urgent!

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Sat 02 Sep 2006 08:45

This problem can be caused by accessing database through network protocol. You should know that you can use relative database path only with local database connection. If you set IBCConnection.Server to any value (even localhost) then IBCConnection.Database must be full path to database file.
If your problem persists then please send us small demo project to IBDAC support address.

Post Reply