CTTable::Attach Attaches a c-tree Plus ISAM datno object to a c-treeDB table object. Declaration void CTTable::Attach(NINT datno); Description
CTTable::Attach() attaches a c-tree Plus ISAM datno object to a c-treeDB table object. This function is useful if you have opened a data and index file using one of c- tree’s ISAM open functions and need to attach it to a table handle to use some of the advanced c-treeDB features such as alter table or the record handler. Return void Example
CTTable hTable(hSession); CTRecord hRecord(hTable); NINT datno, count = 0;
hSession.Logon(SERVER, USER, PASSWD);
datno = (NINT)OPNRFILX((COUNT) -1, "test309.dat", (COUNT)0, NULL);)
hTable.Attach(datno);
if (hRecord.First()) do {
count++; } while (hRecord.Next());
hTable.Detach(); hSession.Logout(); See Also CTTable::AttachXtd(), CTTable::Detach() |
|||