I'm not sure what you mean by a working table. Do you mean a temp-table or a workfile? If it's either of these, you can use all of the same tools and 4GL commands you would use to browse a regular table that's in the database. If you mean something else, could you please clarify? Thanks!
Richtpt
I mean a Work-table. It is similiar to a Temp-table, but temp tables are stored in a temporary db on disk and work table records are stored in memory. Sorry for the confusion.
Ah, got it. Well, the only difference between regular tables in the database schema, temp-tables, and workfiles (work-tables) is how they are stored and for how long. You access all of them the same way.
If I had a database table called Customers and wanted to list every field in that table, I could simply do:
for each customers no-lock:
display customers.
end.
You access temp-tables and workfiles the same way.
Temp-Table: Cust-Tmp
for each Cust-Tmp no-lock:
display Cust-Tmp.
end.
Workfile: Cust-Work
for each Cust-Work no-lock:
display Cust-Work.
end.
You can also use all of the other 4GL tools. You can do a FIND on them, create queries and browsers, do dynamic queries, buffer-copies, all that stuff that you can do with database tables.
And technically, temp-tables start OUT being stored in memory, but when they run out of memory, they start using disk space. Workfiles are completely stored in memory and if you run out of memory, the program will crash. Temp-Tables have other advantages too and are definitely prefered for use in all situations, mainly because you never have to worry about them getting filled up like you do with Workfiles. I've seen the problem with Workfiles first hand and was thrilled when they introduced temp-tables.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.