Previous Topic

Next Topic

CTTable::GetDatno

Retrieve the table data file number.

Declaration

NINT CTTable::GetDatno()

Description

Retrieves the table data file number from a table object. If an error is detected, GetDatno() throw a CTException.

Return

GetDatno() returns the table data file number.

Example


void DeleteTable(CTSEssion& hSession, pTEXT tablename)
{
    CTDBRET eRet;
    CTTable hTable(hSession);

// open the table exclusive
    hTable.Open(tablename, CTOPEN_EXCLUSIVE);

// delete a file
    eRet = (CTDBRET)DeleteRFile((COUNT)hTable.GetDatno());
    if (eRet != CTDBRET_OK)
        throw CTException(eRet, "DeleteTable", __FILE__, __LINE__);
}

See Also

CTBase::SwitchInstance(), CTRecord::SwitchContext(), CTTable::GetIdxno(), CTIndex::GetIdxno()