> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AddNew Method of the DataSetTableColumns Object

This method adds a new column to the data set table.

## Syntax

```vb Visual Basic .NET theme={null}
Function AddNew( _
  Name As String, _
  IsPrimary As Boolean _
) As DataSetTableColumn
```

```cpp C++ theme={null}
HRESULT AddNew(
  BSTR                  Name,
  VARIANT_BOOL          IsPrimary,
  IDataSetTableColumn** Result
);
```

## Parameters

**Name**

\[in] This parameter specifies the name of a new column in the data set table.

**IsPrimary**

\[in] This parameter specifies if this column contains the primary key of the table.\
As each table must have one and only one primary key column, the first column added must have this attribute. If you set this parameter to TRUE when adding any of the subsequent columns, the other columns are guaranteed to no longer have this attribute after this method call.

**Result**

\[out, retval] A pointer to the [**IDataSetTableColumn**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasettablecolumn.md)**\*** variable that receives the interface pointer for the added column.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**DataSetTableColumn**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasettablecolumn.md)
