I'm trying to connect to two different databases with the same structure using the DatabaseConnection_SetConnectionStringForSession function
after using this action, we were unable to connect to the other database, it is still fetching data from the default database.
Note:
- In the Studio Integration the entities changed [db1]. [Dbo]. [Table], for [table].
- ConnectionName: <DB2 Connection Name>
- ConnectionString: "Server = SERVER; Database = DB2; User Id = sa; Password = P;"
Hi,
I guess it is possible to create an extension and do it inside your extension by passing the details of the server and the data to be updated in run time.
Its just my suggestion..
you can only change the connection in a session when, for that session, you haven't used the existing database connection.
KR Hans
I tried to do it that way, but it didn't bring me the result of the second database, am I doing something wrong?
Can you show how you defined the entity/table mapping in integration studio? It might be that you defined the database and schema hardcoded.
Hans Dollen wrote:
Hi Hans,
Can you please specify if there is any format to define entity mapping integration studio? I am also trying to achieve the same as Marcelo but when I remove the database and schema mapping in integration studio, the sql query gives me invalid object error for that table.
Please help!
Thanks in advance
Sai Ravali