D
David Ysmael
Guest
I've created a REST service in my project and am using prodatasets and data-sources to populate the data before it is returned to the client sending the request. The issue I am having is with sorting the data in the dataset to be passed back to the client. I've defined a query on the data-source and am using a BY clause on that query I prepare, but it's not "fully" sorted by that filter. It seems that the index defined on the DB table (tt has been defined LIKE db table) is always applied. Here is the pertinent source code for all that I'm doing. Any help or advice is appreciated. DEFINE TEMP-TABLE tttrkChk NO-UNDO LIKE trk-chk BEFORE-TABLE bttrkChk. DEFINE DATASET dstrkChkBE FOR tttrkChk. DEFINE QUERY trkChkQuery FOR trk-chk SCROLLING. DEFINE DATA-SOURCE trkChkSource FOR QUERY trkChkQuery. DATASET dstrkChkBE:EMPTY-DATASET (). BUFFER tttrkChk:attach-DATA-SOURCE (DATA-SOURCE trkChkSource:handle). QUERY trkChkQuery:QUERY-PREPARE ("FOR EACH trk-chk where Whs-code = '01' and check-in-date = '2018-02-12' BY check-in-time"). DATASET dstrkChkBE:FILL(). BUFFER tttrkChk:detach-DATA-SOURCE.
Continue reading...
Continue reading...