Hilmar,
Oh, I see. You are saying to put the code to close the table in the destroy() method. Are thought you were saying the tables would automatically close when the class went out of scope.
I'm with ya!
>
>No: what I meant is that you create an object (or class) to open a table. The object remembers the name of the alias, and closes it, when the corresponding variable goes out of scope. Thus, after doing this programming once, in the "Table_Open" class, you save yourself the table closing later.
>
>All this isn't required when you have a private datasession, since the tables are closed automatically, anyway.
>
>Let me illustrate:
>
>
>Function SomeProcess
>local loTableObject
>* This command will open the table, with the specified index, assign buffering, etc.
>loTableObject = CreateObject("cTableObject", TableName, Index, Alias, Buffering, etc.)
>...
>Further processing here
>...
>* Here, at the EndFunc, the table gets closed, because:
>* 1) Variable loTableObject gets destroyed (out of scope),
>* 2) This, in turn, invokes loTableObject.Destroy(),
>* 3) which was appropriately programmed to close the table.
>EndFunc
>
>
>Hilmar.
Steve Gibson