aArrayField structure; Nil in name-only mode.
AdvPL GuideCriaTrab( <aArray>, <lDbf> ) --> cNomeDistinguishes obtaining a name from creating a work file.
The historical reference describes CriaTrab(aArray,lDbf): true creates a file using the structure; false only obtains a name. The official Crystal Reports integration example uses CriaTrab(Nil,.F.) for a support filename without demonstrating table creation in that call. This differs from a SQL temporary table managed by FWTemporaryTable. No current dedicated page was located; this page limits itself to the historical contract without guaranteeing local-driver support everywhere. The example only requests a name and does not write to it. (TOTVS, n.d., ref. 1; FERREIRA, 2023, ref. 2)
CriaTrab( <aArray>, <lDbf> ) --> cNomeaArrayField structure; Nil in name-only mode.
lDbfTrue creates a file; false obtains a name under the historical contract.
Work-file name according to the historical reference.
#Include "Protheus.ch"
User Function Ed317()
Local cName := CriaTrab(Nil, .F.)
// Creates no file; the name is not an open table.
ConOut(cValToChar(Len(cName)))
Return NilGenerated-name length, with no fixed content assumed; the example creates no file. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.