0

I'm writing a little POC console IBLite application for Windows, using Delphi and the FireDAC components

Here is a code that works without error:

  lDACConnection := TFDConnection.Create(nil);
  lFDPhysIBDriverLink := TFDPhysIBDriverLink.Create(nil);
  try
    lFDPhysIBDriverLink.Lite := true;
    lDACConnection.DriverName := 'IBLite';
    lDACConnection.Params.Add('Database=.\TestORM.IB'); // <- note the database is local to the application
    lDACConnection.Params.Add('User_Name=sysdba');
    lDACConnection.Params.Add('Password=masterkey');

    lDACConnection.Open(); // the connection opens gracefully

Now if I want to access that same database, located in a LAN UNC path (either directly or mapped to a drive):

    lDACConnection.Params.Add('Database=\\cabale7\<a_network_path_to_my_DB>\TestORM2.IB'); // <- replace lDACConnection.Params.Add('Database=.\TestORM.IB');

then I end up with this Error when opening the TFDConnection:

Project OneToManyTest.exe raised exception class EIBNativeException with message '[FireDAC][Phys][IBLite]Unable to complete network request to host "CABALE7". Failed to establish a connection. The system cannot find the file specified. '.

This is quite annoying because all my data, ie Delphi projects source code and databases, are stored on a LAN server (NAS).

Note: I noticed an Interbase config file, ibconfig, that is supposed to be deployed where the application is. Should this config file be configured /modified for resolving this issue?

13
  • Hard to tell if you are using a valid UNC, does a network path to my DB include the share name? \\server\share\path.
    – Brian
    Commented Apr 24 at 16:51
  • @Brian, of course the \\cabale7\<a_network_path_to_my_DB>\ is freely accessible from the current user's Windows file system Commented Apr 24 at 18:00
  • I think everyone could reproduce easily this issue, trying to open the EMPLOYEE.GDB demo database, if stored on an UNC path. Commented Apr 24 at 18:16
  • 2
    If you're not running interbase on the cabale7 machine, you can't put an interbase database there. "IMPORTANT. You cannot install InterBase software or databases onto mapped drives or UNC paths." ibase.ru/files/interbase/IB55_Embedded_Installation_Guide.pdf
    – Rik
    Commented Apr 25 at 18:50
  • 1
    @DidierCabalé IBLite is the embedded version of Interbase. It could never run on UNC path. The embedded instance needs to have direct low level file access which is not possible over network/samba/etc shares (i.e. UNC path). It's just the way it is designed with embedded interbase.
    – Rik
    Commented Apr 26 at 12:02

1 Answer 1

1

IBLite is the low-footprint embedded version of InterBase. Due to its embedded architecture, IBLite requires direct, low-level access to the database file on the local file system.

Because of this limitation IBLite cannot operate on databases located on UNC paths (e.g., \\server\share\database.ib).

From the InterBase 5.5 Embedded Installation Guide

IMPORTANT. You cannot install InterBase software or databases onto mapped drives or UNC paths. The software and databases must be on a drive local to the machine on which you are using InterBase.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.