How to connect UIPath Studio to an SQL Lite .db file and run a query

How do I successfully connect UiPath Studio to an SQL Lite .db file and run a query?

Hello @Sinenhlanhla_Shelembe,

You can refer this below thread.

Regards,
Bharat

1 Like

Hi @Sinenhlanhla_Shelembe

  1. Install an SQLite OLE DB/ODBC driver on the machine (UiPath doesn’t support SQLite natively).
  2. Use Connect to Database with provider set to the installed SQLite driver (not ADSDSOObject).
  3. Set the connection string like:
    Data Source=C:\path\to\file.db;
  4. In Run Query, use valid SQLite syntax (no TOP, use LIMIT instead).
  5. Store the output in a DataTable variable and verify it’s not null before using it.

Your current error happens because ADSDSOObject does not support SQLite.

If this helps resolve the issue, please mark it as the solution so others can benefit.

1 Like

You are getting this error as selected provider does not support the SQL syntax or database type being used.

First Install a SQLite driver (ODBC or OLE DB) on the machine.

Use Connect activity :
In Connect to Database, choose the installed SQLite driver as the Provider (e.g., System.Data.Odbc or the specific SQLite ODBC provider).
Set your connection string like:

Driver=SQLite3 ODBC Driver;Database=C:\path\to\your\dbfile.db;``

Then use *Execute Query* to run SQL.

UiPath does not support SQLite natively. The error occurs because ADSDSOObject cannot work with SQLite.

Install an SQLite ODBC/OLE DB driver, select that driver as the Provider in Connect to Database, use a proper SQLite connection string, and run the query using SQLite syntax (e.g., LIMIT instead of TOP).

Hi @Sinenhlanhla_Shelembe

Pls refer the below thread:

Happy Automation

Thanks, this worked like magic. I was finally able to get the output I wanted and I was able to write it to a workbook.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.