I have created DataCollectionQueue application with below code (by referring 184.108.40.206 Creating a Data Collection Queue in Oracle Developer Doc)
createPublication(PUBLICATON_NAME, Consolidator.SQLITE_CREATOR_ID, CLIENT_DATABASE_NAME, null);
createDataCollectionQueue(PUBLICATON_ITEM_NAME, CONS_SCHEMA, Store_Name, null, null, false, true);
addPublicationItem(PUBLICATON_NAME, PUBLICATON_ITEM_NAME, null,null, "S", null, null);
every thing works fine but as per the document purgeClientAfterSync—If true, removes client data from the mobile device when uploaded to the server.
But we have made false in the code (you could see in above code) i.e it should not remove client data but it is not working as expected.We could see that the data is removed after sync.
Could anyone please let me know where i am getting it wrong?
For purge enabled Data Collection Queue, yes, the client data will be removed right after the data was uploaded to the server, but immediately, the client will download from the server whatever is already in the out-queue, so before the sync, check if there is data in the out-queue, and after the sync, check if server side out-queue is empty and the data in the client database is that previously resided in server side out queue.
Oracle Database Mobile Server Development
Thank you for the replay.In my case no data is downloaded from server,as soon as the client syn all data will be uploaded to server but client data is removed(Unusual behavior since purgeClientAfterSync is set to false). As i know form the document It is optional to define out-queue and by default out-queue is empty view.An empty view is view that select zero record.So my question is
It necessary to check out-queue has data or not?
Even though we made purgeClientAfterSync as false why does it removes client data?
If i am wrong please let me know