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

# UpdateFromDB Method of the DataSetTableRecords Object

This method resets records to the state of the remote database.

> [!WARNING]
>
> All local changes are lost.

The method can only be used if the Document Definition is in editing mode.

For the initial connection setup you have the following options:

* Use FlexiCapture 12 Developer's package. Set up the database connection string in the project properties and the columns mapping in the data set properties.
* When connecting a new data set, use the [**AddNewAdoSource**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasets-addnewadosource.md) method, which includes the same connection string setting.

After setup, you can also modify the connection string via the [**EnvironmentVariables**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/environmentvariables.md).

## Syntax

```vb Visual Basic .NET theme={null}
Sub UpdateFromDB()
```

```cpp C++ theme={null}
HRESULT UpdateFromDB();
```

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

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