Firebird icon

Firebird

Get, add and update data in Firebird database

Overview

This node connects to a Firebird database server and allows users to perform various database operations such as testing the connection, executing queries, inserting data, and updating records. It is useful in scenarios where you need to integrate Firebird database interactions into your workflows, for example:

  • Verifying connectivity to a Firebird database before running further operations.
  • Running custom SQL queries to fetch or manipulate data.
  • Inserting new records into specified tables.
  • Updating existing records based on key columns.

A practical example would be automating data synchronization between a Firebird database and other systems by querying data and processing it within n8n workflows.

Properties

Name Meaning
Host Host address of the Firebird database server (e.g., "127.0.0.1")
Database Name of the database file or alias (e.g., "database.fdb")
User Username for database authentication (e.g., "SYSDBA")
Password Password for database authentication
Port Port number for the Firebird server (default 3050)
Client Library Path Path to the Firebird client library DLL (e.g., "C:\Windows\SysWOW64\FBCLIENT.DLL")
Wire Crypt Wire encryption level; options: Enabled, Disabled, Required
Auth Plugin Authentication plugin to use; e.g., "Legacy_Auth" for compatibility with older Firebird versions
Role Connection role (optional)
Page Size Page size when creating a new database (default 4096)
Lowercase Keys Whether to convert keys in output JSON to lowercase (true/false)
Reconnect Interval Interval in milliseconds to retry connection if dropped (default 1000 ms)
Timeout Timeout in seconds for operations (minimum 1 second)

Output

The node outputs JSON data structured according to the operation performed:

  • Test Connection: Outputs an object indicating success status, a message, current server timestamp, and connection details like database, host, port, and user.

    Example:

    {
      "success": true,
      "message": "Connection test successful!",
      "serverTime": "2024-06-01T12:34:56Z",
      "database": "database.fdb",
      "host": "127.0.0.1",
      "port": 3050,
      "user": "SYSDBA"
    }
    
  • Execute Query: Returns an array of objects representing rows returned by the query.

  • Insert: Returns the result of the insert operation, typically metadata about affected rows.

  • Update: Returns the result of the update operation, typically metadata about affected rows.

The node does not output binary data.

Dependencies

  • Requires the Firebird client library (FBCLIENT.DLL) accessible at the specified path.
  • Uses the node-firebird package to connect and interact with the Firebird database.
  • Requires valid Firebird database credentials and network access to the database server.
  • No special environment variables are required beyond standard n8n credential management for API keys or authentication tokens.

Troubleshooting

  • Common Issues:

    • Missing or incorrect host, database, or user parameters will cause connection failures.
    • Incorrect path to the Firebird client library DLL can prevent establishing a connection.
    • Network issues or firewall blocking the specified port (default 3050) may cause timeouts.
    • Using unsupported authentication plugins or mismatched Firebird versions can lead to authentication errors.
  • Error Messages:

    • "Failed to connect to Firebird database: <error message>": Indicates connection failure; verify credentials, host, port, and client library path.
    • "Connection test failed: <error message>": Occurs during test connection operation; check network and credentials.
    • "The parameter "<param>" is unknown!": When executing queries with parameters, indicates a mismatch between declared and used parameters.
    • "The operation "<operation>" is not supported!": The node was configured with an unsupported operation; ensure correct operation selection.
  • Resolution Tips:

    • Double-check all connection parameters and ensure the Firebird server is reachable.
    • Verify the client library path matches the installed Firebird client version and system architecture.
    • Use the Test Connection operation first to validate connectivity before running queries.
    • Ensure query parameters match those defined in the input properties.

Links and References

Discussion