> ## 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 DataSets Object

This method adds a new data set at the end of the collection.

## Syntax

```vb Visual Basic .NET theme={null}
Function AddNew(DataSetName As String) As DataSet
```

```cpp C++ theme={null}
HRESULT AddNew(
  BSTR       DataSetName,
  IDataSet** Result
);
```

## Parameters

**DataSetName**

The name of the new data set. It must be unique in the collection.

> [!WARNING]
>
> The name may not end on a digit.\
> It can contain only characters allowed in filenames and cannot be more than 255 characters in length.

**Result**

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

## 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

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