Change database_connection string in factory studio

Hi experts
I’m using Factory Studio connect with SQL server for storing data from Factory studio into SQL Server.
The declaretation in Factory for TagHistorian Database as below picture


Everything worked well, Connetion between Factory and SQL was normal.
But in my project, I have an advanced requirement. I need to change ConnectionString of DB in factory during runtime operation.
I created a button with Code Behind to change ConnectionString of DBs. During Runtime operation, I could change ConnectionString of DBs, but Factory couldn’t connect to new Datasource. After that I paused and start again Dataset function in Startup Window.
The reason I have to change datasoure during runtime operation, when original Database of SQL Server is full Capacity, I need connect Factory studito to a new Database.
Please help me this case
Best.

Hi Manh,

We did some tests in our labs and we couldn’t reproduce the issue. We did the test using SQLite using 2 different databases DB1 and DB2.

You can see in the image below that we could write values in database:

Using the following Queries:

And in the CodeBehind the buttons do this:

When we “Change Data Source” and do the query it will be executed correctly.

What version are you using?

A video is attached to see if this is what you want.

Bests,

Tatsoft Team.

Dear experts
Many thanks your quick feedback.
Can you send me the test project ?
I’m using 9.2.26 - SP2 version
Best

Hi Manh,

Follow the download link:

The only thing you will have to do is to change the database path in Datasets > DBs > ConnectionString. And so, it should work fine.

Bests,
Tatsoft Team.