大网数据广告活动
磁盘与文件系统

JET_COLUMNBASE Structure

· 52CE 我爱测

Learn more about: JET_COLUMNBASE Structure

Applies to: Windows | Windows Server

JET_COLUMNBASE Structure

The JET_COLUMNBASE structure describes the parameters of a base column. The JetGetColumnInfo and JetGetTableColumnInfo functions use the JET_COLUMNBASE structure.

    typedef struct {
      unsigned long cbStruct;
      JET_COLUMNID columnid;
      JET_COLTYP coltyp;
      unsigned short wCountry;
      unsigned short langid;
      unsigned short cp;
      unsigned short wFiller;
      unsigned long cbMax;
      JET_GRBIT grbit;
      tchar szBaseTableName[256];
      tchar szBaseColumnName[256];
    } JET_COLUMNBASE;

Members

cbStruct

The size of this structure, in bytes. Set cbStruct to sizeof( JET_COLUMNBASE ).

columnid

Reserved. Set columnid to 0 (zero).

coltyp

The type of the column (for example, text, binary, or numerical). For more information, see JET_COLTYP.

wCountry

Reserved. Set to 0 (zero).

langid

Reserved. Set to 0 (zero).

cp

The code page for the column. The only valid values for text columns are English (1252) and Unicode (1200). A value of zero means the default will be used (English, 1252). If the column is not a text column, the code page is automatically set to zero.

wFiller

Reserved. Set to 0 (zero).

cbMax

The maximum length, in bytes, of a variable-length column, or the actual length, in bytes, of a fixed-length column.

grbit

Options for the column, including zero or more of the following values.

Value Meaning
JET_bitColumnFixed The column is fixed and occupies the same amount of space in a row regardless of how much data it contains. JET_bitColumnFixed cannot be combined with JET_bitColumnTagged, and cannot be used when the coltyp member is set to JET_coltypLongText or JET_coltypLongBinary.
JET_bitColumnTagged The column is tagged and occupies space in the database only if it contains data. JET_bitColumnTagged cannot be combined with JET_bitColumnFixed, JET_bitColumnVersion, or JET_bitColumnEscrowUpdate.
JET_bitColumnNotNULL The column must not be set to a NULL value.JET_bitColumnNotNULL cannot be combined with JET_bitColumnUserDefinedDefault.
JET_bitColumnVersion The column is a version column that specifies the version of the row. The value of this column starts at zero and is automatically incremented for each update of the row.JET_bitColumnVersion can be used only when the coltyp member is set to JET_coltypLong and cannot be combined with JET_bitColumnAutoincrement, JET_bitColumnEscrowUpdate, JET_bitColumnTagged, or JET_bitColumnUserDefinedDefault.
JET_bitColumnAutoincrement The column is automatically incremented. The number is an increasing number, and is guaranteed to be unique within a table. The numbers, however, may not be sequential. For example, if five rows are inserted into a table, the automatically incremented column could contain the values { 1, 2, 6, 7, 8 }.JET_bitColumnAutoincrement can be used only when the coltyp member is set to JET_coltypLong or JET_coltypCurrency and cannot be combined with JET_bitColumnEscrowUpdate, JET_bitColumnUserDefinedDefault, or JET_bitColumnVersion.Windows 2000:  JET_bitColumnVersion can be used only when the coltyp member is set to JET_coltypLong.
JET_bitColumnUpdatable Valid only for calls to <a href="gg269215(v=exchg.10).md">JetGetColumnInfo</a>. JET_bitColumnUpdatable cannot be combined with JET_bitColumnUserDefinedDefault.
JET_bitColumnTTKey Valid only on calls to <a href="gg294118(v=exchg.10).md">JetOpenTable</a>.
JET_bitColumnTTDescending Valid only on calls to <a href="gg269211(v=exchg.10).md">JetOpenTempTable</a>.
JET_bitColumnMultiValued The column can be multi-valued. A multi-valued column can have zero, one, or more values associated with it. The various values in a multi-valued column are identified by a number in the itagSequence member of various structures, for example, <a href="gg294049(v=exchg.10).md">JET_RETINFO</a>, <a href="gg294090(v=exchg.10).md">JET_SETINFO</a>, <a href="gg269233(v=exchg.10).md">JET_SETCOLUMN</a>, <a href="gg269334(v=exchg.10).md">JET_RETRIEVECOLUMN</a>, <a href="gg294052(v=exchg.10).md">JET_ENUMCOLUMNVALUE</a>. Multi-valued columns must be tagged columns; that is, they may not be fixed-length or variable-length columns.
JET_bitColumnEscrowUpdate Specifies that a column is an escrow update column that can be updated concurrently by different sessions with <a href="gg294125(v=exchg.10).md">JetEscrowUpdate</a> and will have transactional consistency.<ul><li>An escrow update column can be created only when the table is empty.</li></ul><ul><li>For an escrow update column, the coltyp member must be set to JET_coltypLong.</li></ul><ul><li>An escrow update column must have a default value (that is cbDefault must be positive).</li></ul><ul><li>JET_bitColumnEscrowUpdate cannot be combined with JET_bitColumnTagged, JET_bitColumnVersion, or JET_bitColumnAutoincrement.</li></ul>
JET_bitColumnUnversioned The column is created without a version number. This means that other transactions attempting to add a column with the same name will fail. JET_bitColumnUnversioned is used only with <a href="gg294122(v=exchg.10).md">JetAddColumn</a>. It cannot be used within a transaction.
JET_bitColumnMaybeNull Reserved for future use.JET_bitColumnMaybeNull cannot be combined with JET_bitColumnUserDefinedDefault.
JET_bitColumnFinalize Do not use. Use JET_bitColumnDeleteOnZero instead.The column can be finalized. A column that can be finalized is an escrow update column that causes the row to be deleted when the column reaches zero. Future versions may invoke a callback function instead (See <a href="gg294098(v=exchg.10).md">JET_CALLBACK</a>). A column that can be finalized must be an escrow update column. JET_bitColumnFinalize cannot be combined with JET_bitColumnUserDefinedDefault.
JET_bitColumnUserDefinedDefault The default value for a column will be provided by a callback function. See <a href="gg294098(v=exchg.10).md">JET_CALLBACK</a>. A column that has a user-defined default must be a tagged column. If JET_bitColumnUserDefinedDefault is specified, the pvDefault must point to a <a href="gg269200(v=exchg.10).md">JET_USERDEFINEDDEFAULT</a> structure, and cbDefault must be set to sizeof( JET_USERDEFINEDDEFAULT ).JET_bitColumnUserDefinedDefault cannot be combined with JET_bitColumnFixed, JET_bitColumnNotNULL, JET_bitColumnVersion, JET_bitColumnAutoincrement, JET_bitColumnUpdatable, JET_bitColumnEscrowUpdate, JET_bitColumnFinalize, JET_bitColumnDeleteOnZero, or JET_bitColumnMaybeNull.
JET_bitColumnDeleteOnZero The column is an escrow update column and when it reaches zero, the record will be deleted. A common use for delete-on-zero columns is as reference count fields. When the number of references fall to zero, the record is deleted. A delete-on-zero column must be an escrow update column.JET_bitColumnDeleteOnZero replaces JET_bitColumnFinalize.JET_bitColumnDeleteOnZero cannot be combined with JET_bitColumnFinalize or JET_bitColumnUserDefinedDefault, and cannot be used with user-defined default columns.

szBaseTableName

The table from which the current table inherits its DDL.

szBaseColumnName

The name of the column in the template table.

Remarks

JET_COLUMNBASE contains much of the same information as JET_COLUMNDEF, but it adds string fields to describe the base table (if a hierarchical DDL was used).

Requirements

Requirement Value
Client Requires Windows Vista, Windows XP, or Windows 2000 Professional.
Server Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.
Header Declared in Esent.h.
Unicode Implemented as JET_COLUMNBASE_W (Unicode) and JET_COLUMNBASE_A (ANSI).

See Also

JET_CALLBACK
JET_COLTYP
JET_COLUMNDEF
JET_COLUMNID
JET_GRBIT
JET_SESID
JET_TABLEID
JET_USERDEFINEDDEFAULT
JetGetColumnInfo
JetGetTableColumnInfo
JetRenameColumn

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 04/11/2016
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。