CTTable.Detach
Detaches a c-treeDB .NET table object from a c-tree data and index files.
Declaration
void CTTable.Detach();
Description
CTTable.Detach() detaches a c-treeDB .NET table object from a c-tree data and index files. The table is not closed but the c-treeDB .NET table handle resources are released and the handle re-initialized.
Return
void
Example
CTSession hSession(CTSESSION_CTREE);
CTTable hTable(hSession);
CTRecord hRecord(hTable);
NINT datno, count = 0;
// logon to c-tree
hSession.Logon(SERVER, USER, PASSWD);
// open the file using c-tree ISAM
datno = (NINT)OPNRFILX((COUNT) -1, "test309.dat", (COUNT)0, NULL);
// attach to table
hTable.Attach(datno);
// read the records
if (hRecord.First())
do
{
count++;
}
while (hRecord.Next());
// cleanup
hTable.Detach();
hSession.Logout();|
See Also
CTTable.Attach(), CTTable.AttachXtd()