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

# LookUp Method of the DataSetTableRecords Object

This method returns the results of a search in the data set. The search string can include any record information.

## Syntax

```vb Visual Basic .NET theme={null}
Function LookUp(Query As String) As DataSetTableRecords
```

```cpp C++ theme={null}
HRESULT LookUp(
  BSTR                   Query,
  IDataSetTableRecords** Result
);
```

## Parameters

**Query**

\[in] The search string.

**Result**

\[out, retval] A pointer to **IDataSetTableRecords\*** pointer variable that receives the interface pointer of the output [**DataSetTableRecords**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasettablerecords.md) object containing the records that were found. You may not call the [**DeleteAll**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/deleteall.md), [**DeleteAt**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/deleteat.md), [**Commit**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasettablerecords-commit.md), [**LookUp**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasettablerecords-lookup.md), [**AddNew**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasettablerecords-addnew.md), [**UpdateFromDB**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasettablerecords-updatefromdb.md) methods for this object. Only the [**Count**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/count.md) and [**Element**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/element.md) properties and [**Item**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/item.md) method are available, so that you can iterate through the search results and retrieve or edit any of the records matching the search query.

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

## Samples

This method is used in the following code samples: [Invoices Processing and Training](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md#invoicesprocessingandtraining).

## See also

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