Adding Tables to the Database

Windows

Last modified: January 09, 2012

Applies to: Windows | Windows Server

Tables are a heterogeneous collection of records that physically and logically group the data in the database. Tables are uniquely identified by their name. The table ID (JET_TABLEID) is a handle to a cursor that is used to update and navigate tables. You may open multiple JET_TABLEID on the same table.

An existing table is opened in the call to JetOpenTable, and a new table is created without rows or columns with JetCreateTable. To atomically create a table with an initial set of columns and indices, call JetCreateTableColumnIndex or JetCreateTableColumnIndex2. The initial size of the table is given in the lPages parameter in JetCreateTable or the ulPages member of the JET_TABLECREATE structure in the call to JetCreateTableColumnIndex. Tables grow automatically when data is added to the table. The growth is proportional to the initial size of the table. Columns may be added to the table at any time with JetAddColumn. When the application no longer needs to access the table, the cursor can be closed with JetCloseTable. The table may be deleted via a call to JetDeleteTable.

Table operations should be performed within the context of a transaction.

Show: