PvAddTable()
Creates a new table in the existing dictionary and a data file at the location specified in the table properties.
Header File: ddf.h (See also Header Files)
Function First Available In Library: w3dbav75.dll (Windows), libpsqldti.so (Linux), libpsqldti.dylib (OS X) (See also Link Libraries)
Syntax
PRESULT PvAddTable(
   WORD            dictHandle,
   TABLEINFO*      tableProps,
   COLUMNMAP*      columnList,
   WORD            columnCount,
   INDEXMAP*       indexList,
   WORD            indexCount);
Arguments
 
Return Values
 
Remarks
You must first open a dictionary successfully using PvOpenDatabase().
This function has to be provided with table information, columns, and indexes. indexCount and indexList are optional parameters because indexes are not required to create a table.
This function will fail if a table with the same name is already present in the specified dictionary.
Table properties must be set up correctly and an array of at least one column must be passed.
You will need to allocate and release COLUMNMAP and INDEXMAP arrays and TABLEINFO structure used to describe table. See also COLUMNMAP Flags.
The offset of a field within its row can be accessed through the PvGetTable() function. The COLUMNMAP structure has been modified in ddfstrct.h to contain this additional information. This new field is ignored when calling the PvAddTable() and PvFreeTable() functions. Refer to ddfstrct.h and ddf.h.
See Also
PvStart()
PvOpenDatabase()
PvGetTableNames()
PvFreeTableNames()
PvDropTable()
PvCloseDictionary()
PvStop()