Execute query : Cannot modify the design of table 'table_name'. It is in a read-only database

I’m trying to connect to a folder called “csvs” with a database connection string. The folder will contain a .csv file for each table in the database.

Connection string:
“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=csvs;Mode=ReadWrite;Extended Properties=‘text;HDR=Yes;FMT=Delimited;ReadOnly=False’;”

Provider name:
“System.Data.OleDb”

Query:
“CREATE TABLE table_name (column1 varchar(255), column2 int)”

UiPath throws an exception:
“Execute query : Cannot modify the design of table ‘table_name’. It is in a read-only database.”
when trying to run the query.

I don’t have much experience with connection strings and I’ve been unable to figure out why my connection string seems to be connecting in read only mode. I haven’t found a solution on google either :frowning:

Any help would be greatly appreciated, Thanks!

Not sure, but have you tried the same query using Execute Non Query??
Because Execute Query is for Select operations and non query is for CRUD operation.
Thanks,
Jiban

1 Like

Thanks for the suggestion. I’ve just tried this, I get the same error.

To anyone that finds this post in the future, The solution is that you need to add ‘.csv’ onto the end of your table name in the query.
The error message was very uninformative and it doesn’t give you a fair chance to figure out what’s really going on.

2 Likes