We are trying to get data from a view on an external Oracle Database.
We are using a connector and a connection to the external database to do it
The problem is that when the developer of the view makes a select statement on the view using a tool like SQL Developer, their query returns data.
When we try in OutSystems using both an aggregate and SQL query, we get a "Query Returned No Rows" message
Do you have any idea on what could be wrong?
Hi Nuno, and thanks for the reply,
It was a simple SELECT statement with no conditions.
We found what it was. When the SELECT statement was executed using the Outsystems user, no rows were fetched. When it was executed with a different user, rows were fetched.
It had to do with the permissions the Outsystems user has on that database.
Stupid question - have you verified the username and password to access the data base in the Database Connection ?
Thank you! :P
I'd get an "incorrect username/password" error if that was the case.
What I didn't check was whether when running with the specific user, the query returns results.
There was this peculiarity.
Hi Marios,
Did you try to do a simple selection without conditions? Are you using null or '' in the conditions of the query? Please note that in OutSystems when using Oracle an empty string needs to have a space, like this ' ', and also for null it's possible that you have some failures.
Glad you found the issue.
Sometimes these permissions issues are difficult to remember because we are expecting to get an error instead of no rows returned.