Skip to main content

Connect

Establishes a connection to a SQLite database.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Options

  • Connection String - The SQLite connection string to connect to the database.

Output

  • Connection Id - The identifier for the established database connection.

How It Works

The Connect node establishes a connection to a SQLite database using the provided connection string. When executed, the node:

  1. Validates the provided Connection String option
  2. Creates a new SQLiteConnection object with the connection string
  3. Generates a unique connection identifier (GUID)
  4. Acquires a mutex lock to ensure thread safety
  5. Opens the database connection
  6. Stores the connection in the SQLite connection pool with the GUID as key
  7. Releases the mutex lock
  8. Returns the connection identifier as output

Requirements

  • A valid SQLite connection string
  • Proper file permissions to access the database file (if using file-based database)

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Connection String
  • Database file not found or inaccessible
  • Insufficient permissions to access the database
  • Database is locked by another process

Usage Notes

  • The Connection String should follow the SQLite connection string format
  • The returned Connection Id should be used with other SQLite nodes that require a connection
  • Always ensure connections are properly closed using the Disconnect node when no longer needed
  • Connection strings typically follow the format: "Data Source=path/to/database.db;Version=3;"