如何将文件的内容分配给正在进行的 openedge 4gl 中的字符串变量?
How to assign content of a file to a string variable in progress openedge 4gl?
将一个大约 80 KB 的巨大文件的内容分配给一个字符串变量
copy-lob from file "E:\edifact\test685.EDI" to text-memptr.
v-edistring = get-string(text-memptr,1).
shows error attempt to exceed maximum size of character variable.
你真的需要内存指针吗?否则,您可以直接将 LOB 复制到 LONGCHAR。
DEFINE VARIABLE cString AS LONGCHAR NO-UNDO.
COPY-LOB FROM FILE "E:\edifact\test\PFCONCEPT22685.EDI" TO cString.
将一个大约 80 KB 的巨大文件的内容分配给一个字符串变量
copy-lob from file "E:\edifact\test685.EDI" to text-memptr.
v-edistring = get-string(text-memptr,1).
shows error attempt to exceed maximum size of character variable.
你真的需要内存指针吗?否则,您可以直接将 LOB 复制到 LONGCHAR。
DEFINE VARIABLE cString AS LONGCHAR NO-UNDO.
COPY-LOB FROM FILE "E:\edifact\test\PFCONCEPT22685.EDI" TO cString.