2

How I can configure firedac to relative path to database firebird in DesignTime

object Conn: TFDConnection
Params.Strings = (

    'Database=..\..\Win32\' +
    'bin\DADOS.FDB'
  'Protocol=TCPIP'
  'Server=127.0.0.1'
  'User_Name=sysdba'
  'Password=masterkey'
  'CharacterSet=win1252'
  'ExtendedMetadata=True'
  'DriverID=FB')
ResourceOptions.AssignedValues = [rvAutoConnect, rvAutoReconnect]
ResourceOptions.AutoConnect = False
ResourceOptions.AutoReconnect = True
ConnectedStoredUsage = [auDesignTime]
LoginPrompt = False
Left = 56
Top = 24
end

object FDPhysFBDriverLink1: TFDPhysFBDriverLink
  DriverID = 'FB'
  VendorLib = '..\$(Platform)\bin\fbclient.dll'
  Left = 136
  Top = 24
end

DriverLink Works, Firedac connection no.

Only this works

object Conn: TFDConnection
Params.Strings = (

    'Database=D:\Users\Paulo\Documents\Projetos\ProjectName\Win' +
    '32\bin\DADOS.FDB'
  'Protocol=TCPIP'
  'Server=127.0.0.1'
  'User_Name=sysdba'
  'Password=masterkey'
  'CharacterSet=win1252'
  'ExtendedMetadata=True'
  'DriverID=FB')

This utils in case use subversion control, don't neds configure path to DesignTime.

0

1 Answer 1

3

I'm not sure if it's possible. Even if it were, it doesn't sound like a reliable solution. FireDAC would need to have some explicit option to define a working directory for its design time part. Otherwise it would be tied to the IDE's working directory.

Instead I would make a connection definition which would be stored on each member's computer and use this definition for the connection component. This will work even if you'll be versioning that DB because everyone can set the path to their subversion folder to that database individually.

Except that it brings the benefit of separating from this versioned database (if someone decides to use their own database stored somewhere else, they just modify their connection definition file). It's like an ordinary database alias, just more complex.

Sign up to request clarification or add additional context in comments.

1 Comment

Another (probably worse) option is using a windows environment variable. FireDac can use those at design time for the connection.

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.