[progress Communities] [progress Openedge Abl] Forum Post: Re: Ooabl Returning A Dynamic...

  • Thread starter Thread starter Peter Judge
  • Start date Start date
Status
Not open for further replies.
P

Peter Judge

Guest
Maybe I'm misunderstanding, but you could overload the Get() method to accept a buffer handle. This would allow you to pass in an existing temp-table handle which you could manipulate however you choose. Something like Def temp-table ttCust no-undo like mydb.Customer. find first ttCust no-error. message available ttCust. /* NO */ dynQuery:newQuery() :for("Customer") :where("name", "fred") :get(input buffer ttCust:handle). /* now you can do all the static code you want */ find first ttCust no-error. message available ttCust. /* YES */ The dynQuery:Get() code can be something like method public dynQuery Get(input phbuffer as handle): hQry:open(). do while not hQry:query-off-end transaction: phbuffer;buffer-create(). phbuffer:buffer-copy(hqry:get-buffer-handle(1)). phBuffer:buffer-release() end. return this-object. finally: hqry:close(). end. end method. method public dynQuery Get(): def var hTT as handle. create temp-table hTT. /* create like etc etc etc */ return this--object:Get(hTT:default-buffer-handle). end method. The above code works for only a single query table. multiple tables are left as an exercise for the reader.

Continue reading...
 
Status
Not open for further replies.
Back
Top