Dynamic database access

Dynamic database access

I have a request to write an application that allows users to view, export, modify data in only database views that they have access to. We do not want to create database connections that hard-code views since the app will need to be updated every time a view is added or changed.

Does anyone know of a way to do this in Outsystems?
Define views for each user.  In each view you must identify what fields are selected.  In Outsystems you would create a structure which would hold the available fields.  The app would normally just reference this structure, but if you created an XML parameter or web service and have the app be smart enough to handle the XML you might be able to get what you want.  The XML would change as the underlying views change but the app could be written to handle added, changed or removed fields. I suspect it will be challenging to do.  I don't believe this is an Outsystems problem as you would have the same challenges regardless of the platform used, in my opinion.

Hope this helps.
Well, Imho it's just moving the problem to the database, so if it's wise, I doubt it.

on your specific question if you can switch connections runtime, yes you can.
if it's wise, I highly doubt it, because you are manually screwing up connectionPools.

still, suggestions:

Integration Studio
On that note, if you are doing that, you are in c#/java code anyways, and well, there you have the freedom of world. so whatever view you want to pick you can query it old-skool.
how you present it back to the espace is up to you.. 

Do a smart advanced Query with "FOR XML"  to transform you data to xml.
then you don;t care how the structure looks like, and you will have to do something smart with the xml to an edit/list screen.

it's possible, but you introduce a LOT of runtime-validation-checking, errorhandling etc.