Rune Query: Invalid object name '[DatabaseName].[dbo].[TableName]'

Hi,
I’m getting the following error while running ‘Run Query’ or ‘Run Command’ activities in UiPath.
Error: Invalid object name ‘[DatabaseName].[dbo].[TableName]’
The table is available in the database and I tried with only ‘[dbo].[TableName]’ and ‘[TableName]’ too but got the same error.
Database configuration:
Provider- Microsoft.Data.SqlClient
The connection was tested successfully using the given Data Source and database [DatabaseName] in ‘Connect to Database’ activity.

Can anybody help me please?

@chiru_033

Can you verify the tablename properly…looks like the table is missing or renamed

cheers

Hi, I’ve checked. The table name is correct as per the data base.
What are the probable reasons for such errors ?

@chiru_033

The only possible reason is wrong name generally…can you open the exception details in locals panel and check if you have more info there

Also does your tablename contain any special characters or spaces…can you show how you are prociding the details

Cheers

The error message : " Invalid object name ‘[DatabaseName].[dbo].[TableName]’"
Exception Type: Microsoft.Data.SqlClient.SqlException
Source: Run Query

FYI , this table name contains a dot (‘.’) and a whitespace but as I’m using it should not be an issue right?

The error message : " Invalid object name ‘[DatabaseName].[dbo].[TableName]’"
Exception Type: Microsoft.Data.SqlClient.SqlException
Source: Run Query

FYI , this table name contains a dot (‘.’) and a whitespace but as I’m using [ ] it should not be an issue right?

@chiru_033

Just to check can you tey with a dummy table without dot and see if the issue persists

Cheers

I’ve tried with another table which doesn’t have any space - given same error
I’ve tried with another table ‘Table1’ too, which doesn’t exist in the database - it has given the same error!

Weird thing is the for an table which doesn’t exist at all should throw an error like
database.Table1 doesn’t exist
But the error here is Invalid Object Name - and the same error is coming for the tables that exist as well as for those table which don’t exist!!!

@chiru_033

  1. Try changing the DB activities version and check
  2. Which drivers are you using?

cheers

I’ve downgraded the UiPath.Database.Activities package from 1.7 to 1.3 but facing the same issue.

I’m using
Provider- Microsoft.Data.SqlClient
SQL Server version in my machine- 10.00.14393.5980