[Progress Communities] [Progress OpenEdge ABL] Forum Post: prodataset sort issues with temp-table defined LIKE db table

  • Thread starter Thread starter David Ysmael
  • Start date Start date
Status
Not open for further replies.
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...
 
Status
Not open for further replies.
Back
Top