[progress Communities] [progress Openedge Abl] Forum Post: Re: Dynamic Query

  • Thread starter Thread starter Brian K. Maher
  • Start date Start date
Status
Not open for further replies.
B

Brian K. Maher

Guest
The following variant of your code, which runs against the sports2000 database, works just fine. I don't know what is wrong with your code. Perhaps if you posted the full code (yours is missing, at a minimum, several variable definitions) and told us the version of OpenEdge you are using we could be of more help. DEFINE VARIABLE ip_Buffers AS CHARACTER NO-UNDO INITIAL "customer,order". DEFINE VARIABLE lv_Buffers AS HANDLE NO-UNDO. DEFINE VARIABLE retrn AS LOGICAL NO-UNDO. DEFINE VARIABLE qry_Address AS HANDLE NO-UNDO. DEFINE VARIABLE lv_x AS INTEGER NO-UNDO. DEFINE VARIABLE ip_querystring AS CHARACTER NO-UNDO INITIAL "for each customer, each order of customer". CREATE QUERY qry_Address. DO lv_x = 1 TO NUM-ENTRIES(ip_Buffers): CREATE BUFFER lv_buffers FOR TABLE ENTRY(lv_x, ip_Buffers). qry_Address:ADD-BUFFER(lv_Buffers:HANDLE). END. qry_Address:SET-BUFFERS(BUFFER customer:HANDle , BUFFER order:HANDLE). qry_Address:QUERY-PREPARE (ip_QueryString ). retrn = qry_Address:QUERY-OPEN (). IF NOT retrn THEN DO: MESSAGE "No records founds" VIEW-AS ALERT-BOX. RETURN. END.

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