Question

Database Connection String

  • 18 April 2022
  • 1 reply
  • 530 views

Userlevel 7
Badge +13

I have a Database file in my local drive with .db as its extension. What should be the correct way to mention the Connection string in order to access the same.

 

Currently, I tried with the following Strings which are not working.

 

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\padmakumarc\OneDrive - Gulf Business Machines\Desktop\Automation Anywhere Tasks\Database.db;Version=3;

 

 

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\padmakumarc\OneDrive - Gulf Business Machines\Desktop\Automation Anywhere Tasks\Database.db;Extended Properties="HDR=YES"

 

I am getting the below-shown error while trying with the above String.

 

image.png


1 reply

Userlevel 6
Badge +9

Hello,

 

Please try the below steps and let me know if the issue persists.

 

Note: Automation Anywhere client uses 32-bit drivers to connect to Excel files. Please make sure that necessary drivers are installed before proceeding further.

In case if you find any drivers problem then please refer to the following link to download and install the 32-bit driver:

https://www.microsoft.com/en-in/download/details.aspx?id=13255

 

1. Add the Database command in the workbench.

2. The Database command window will open.

3. Select Connect option > Build Connection String > Select Microsoft OLE DB Provider for ODBC Drivers. Click next.

4. Select Use Connection String radio button > Click on Build.

5. Click on Machine Data Source tab > Select Excel (or Excel Files, or any other custom DSN created for Excel 32-bit driver) and Click on OK button.

6. Navigate to the Excel file which needs to be connected to and Click on OK button.

7. Click on Test Connection button and verify that the connection works.

8. Click on OK button and Click on Save to complete the configuration for the Database command. Now test.

 

If you have any questions please let me know.

 

Thank you,

Prabhakar Jha

Reply