Database Connector - Not able to fetch data

0
Hi All, I am trying to run ‘Select’ query on PostgreSQL DB, however i am not able to fetch the records using execute query. Everything works fine and there are no errors, but the records are not getting saved to the entity.  Below is the snippet of microflow. Creating the object first and then executing select query for attributes of that entity. But every time it gives null value only.  Please let me know if i am missing something here. 
asked
2 answers
1

Maybe the NewJournalDB is not yet stored in the database at the time that ExecuteQuery actually executes the SELECT-statement. First, make sure that JournalDB does contain objects in the database and then start this microflow.

Also, set the advanced loglevel of ConnectionBus_Retrieve and ConnectionBus_Update to Trace to see what is happening. Maybe execute runs before the commit of CreateJournal is done.

And there is the more Mendix specific alternative of using OQL, which can probably do the same.

If that all does not bring you to the answer, can you show us the content of ExecuteQuery?

answered
1

The above mentioned problem got resolved by adding ‘Create Object’ activity after ‘Execute Query’ activity. Basically first fetch rows from database and then create respective objects by setting return value of query execution. 

answered