[Progress Communities] [Progress OpenEdge ABL] Forum Post: OpenEdge 11.6 - Error Message | Unable to allocate memory for token array. (9104)

Status
Not open for further replies.
A

atuldalvi123

Guest
Hello All, Any idea on the error "Unable to allocate memory for token array. (9104)" ? I am creating couple of temp tables with data and calling one common procedure in the same program to assign those table field data to a LONGCHAR variable ? I think longchar variable is not capable to handle all the data and so the error is but not sure. Code sample is below. PROCEDURE writeTableToOutput: DEFINE INPUT PARAMETER ipcTableName AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER ipcQueryString AS CHARACTER NO-UNDO. DEFINE INPUT-OUTPUT PARAMETER ioplcOutput AS LONGCHAR NO-UNDO. DEFINE VARIABLE icounter AS INTEGER NO-UNDO. DEFINE VARIABLE hbufTable AS HANDLE NO-UNDO. DEFINE VARIABLE hQuery AS HANDLE NO-UNDO. CREATE BUFFER hBufTable FOR TABLE ipcTableName. CREATE QUERY hQuery. hQuery:ADD-BUFFER(hBufTAble). hQuery:QUERY-PREPARE(ipcQueryString). hQuery:QUERY-OPEN(). REPEAT: hQuery:GET-NEXT(). IF hQuery:QUERY-OFF-END THEN LEAVE. ioplcOutput = SUBSTITUTE("&1[&2]&3&4", ioplcOutput , SUBSTRING(ipcTableName,3,LENGTH(ipcTableName)),CHR(13),CHR(10)). DO icounter = 1 TO hbufTable:NUM-FIELDS: ioplcOutput = SUBSTITUTE("&1&2|",ioplcOutput , hbufTable:BUFFER-FIELD(icounter):buffer-value ). END. ioplcOutput = SUBSTITUTE("&1&2&3",ioplcOutput,CHR(13),CHR(10)). END. DELETE OBJECT hBufTable. DELETE OBJECT hQuery. END PROCEDURE. Any alternative for this ? Thanks in advance.

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