Hi Giri,
Just to be sure that I understand the scenario properly-
Have you connected a table to your DB collection using the editor and added a query using code and the rows shows up and disappear after the query is executed? Why not trying firstly executing the query and afterwards setting the table rows using code?
If this is not the scenario, please provide us with a video of the issue using screencast so that we can better understand what you were referring. Simply recreate the issue while recording the steps. Add the screencast.com URL to your response.
Thanks,
Tal.