Access a database from another app without importing it as a dependency

Access a database from another app without importing it as a dependency

  

Hi,

I have an app that needs to access a database I created in another app. Is there any way I can do this, without importing the database as a dependency? The reason I don't want to do this is because if the app is deleted I still need to be able to access the content of the tables of my database.

Thank you,

Ana Santos

This is a very similar question to this one: https://www.outsystems.com/forums/discussion/32759/acess-entity-from-another-app-without-adding-as-a-dependency/

While I don't recommend the practice, one way to do this is using the following syntax in an Advanced SQL Query:

exec sp_executesql @query

Where the @query is a text input parameter (not expanded inline) with the text of your query. You need to use the database table name, not the entity name.

A better approach would be to "separate" the entities from the rest of the web application. Thus, you can keep using it after the web application itself is deleted.

Eduardo Jauch wrote:

This is a very similar question to this one: https://www.outsystems.com/forums/discussion/32759/acess-entity-from-another-app-without-adding-as-a-dependency/

While I don't recommend the practice, one way to do this is using the following syntax in an Advanced SQL Query:

exec sp_executesql @query

Where the @query is a text input parameter (not expanded inline) with the text of your query. You need to use the database table name, not the entity name.

A better approach would be to "separate" the entities from the rest of the web application. Thus, you can keep using it after the web application itself is deleted.

Hello,

If you need to delete an application that has data that you want to keep using in another one, I think it's because that tables that you need should be in a different application (App A, B and C (new)). 

With your strategy, take attention to the DBCleaner, because in that way you can say goodbye to "old" tables and data.

Kind regards


Exactly. 

Refactoring the application to separate the data into another one is the way to go.

Cheers,
Eduardo Jauch