[progress Communities] [progress Openedge Abl] Forum Post: Re: How I Can Recive A Object...

  • Thread starter Thread starter Mike Fechner
  • Start date Start date
Status
Not open for further replies.
M

Mike Fechner

Guest
So if I understand you right, you are asking on how to iterate records in a ProDataset that should are receiving by DATASET-HANDLE. Right? If I misunderstood your question, please come back at any time. First advice, don’t use a DATASET-HANDLE in that situation, just pass the HANDLE of the Dataset. A DATASET-HANDLE can be a deep copy (decision of the caller) and the callee is responsible to DELETE OBJECT it properly. CONSTRUCTOR PUBLIC testGrafica ( INPUT tituloH AS CHARACTER, INPUT tituloV AS CHARACTER, INPUT dimensionH AS INTEGER,INPUT dimensionV AS INTEGER, INPUT HANDLE h dsTablas ): Then you need to know the name of the tables and fields. I’m going to use the first root table of the dataset and cField as CHARACTER variable to hold a field name now. DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO . DEFINE VARIABLE hQuery AS HANDLE NO-UNDO . DEFINE VARIABLE cField AS CHARACTER NO-UNDO INIT "custnum" . ASSIGN hBuffer = hdsTablas : GET-TOP-BUFFER ( 1 ) hQuery = hdsTablas : TOP-NAV-QUERY ( 1 ) . hQuery : QUERY-OPEN () . hQuery : GET-FIRST () . DO WHILE NOT hQuery : QUERY-OFF-END : MESSAGE hBuffer : BUFFER-FIELD ( cField ): BUFFER-VALUE VIEW-AS ALERT-BOX . hQuery : GET-NEXT () . END .

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