ctdbAddTableXtd Add an existing table to a database with additional physical file information. Declaration ctdbAddTableXtd( CTHANDLE Handle, pTEXT Name, pTEXT PhysicalName, pTEXT Path ) Description ctdbAddTableXtd() adds an existing table to a database.
This extended function allows adding a table to a c-treeDB database specified with a logical and physical table name (the physical table name is the name on disk without extension and path), the logical table name is the one associated with file operations such as ctdbOpenTable(). Note: While multiple files with the same physical names can be added to a c-treeDB database dictionary, they logical names must still be unique. A mirrored table can be added to a c-treeDB database dictionary by calling ctdbAddTable() function and specifying the table name and path using the appropriate mirror naming convention: if (ctdbAddTable(hDatabase, "customer|mirror", "primary_path|mirror_path")) printf("ctdbAddTable failed\n");
If a table is created originally without mirroring, it can subsequently be mirrored as follows:
Returns ctdbAddTable() returns CTDBRET_OK on success, or the c-tree error code on failure. Example
eRet = ctdbAddTable(hTable, "custmast2", "customer.dat" "c:\company2"); See also ctdbAddTable(), ctdbCreateTable(), ctdbAllocTable(), ctdbDeleteTable(), ctdbDropTable() |
|||