Skip to main content

Create Database

Creates a new SQLite database file.

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.

Inputs

  • DB File Path - The file path where the new SQLite database will be created.

Options

  • Overwrite If Exists - If true, overwrites the database file if it already exists. Default is false.

How It Works

The Create Database node creates a new SQLite database file at the specified path. When executed, the node:

  1. Validates the provided DB File Path input
  2. Checks if a file already exists at the specified path
  3. If a file exists and Overwrite If Exists is true, deletes the existing file
  4. If a file exists and Overwrite If Exists is false, throws an error
  5. Creates a new SQLite database file at the specified path

Requirements

  • Valid file path with write permissions
  • Sufficient disk space for the new database file

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid DB File Path
  • Database file already exists and Overwrite If Exists is false
  • Insufficient permissions to create file at the specified path
  • Invalid file path

Usage Notes

  • The DB File Path should include the full path and filename with .db extension
  • If Overwrite If Exists is false, the node will fail if a file already exists at the path
  • The created database will be an empty SQLite database file ready for tables and data
  • Ensure the directory in the file path exists before running the node