ICogDatabase Fetch Method (Int32)Cognex VisionPro 9.8 SR1
Create an ICogRecord that duplicates the item specified by the supplied index. Note that a new ICogRecord is created every time this method is called.

Namespace: Cognex.VisionPro.Database
Assembly: Cognex.VisionPro.Database (in Cognex.VisionPro.Database.dll) Version: 75.0.0.0 (75.0.0.0)
Syntax

ICogRecord Fetch(
	int index
)

Parameters

index
Type: System Int32
This index specifies the item to fetch from the database. Indexing is with respect to the list of keys returned by the GetKeys method.

Return Value

Type: ICogRecord
A newly created instance of the requested database item.
Exceptions

ExceptionCondition
ObjectDisposedException Thrown if this object has already been disposed.
InvalidOperationException Thrown if not currently connected.
ArgumentOutOfRangeException Thrown if the input argument, index, is less than zero or greater than or equal to the value returned by the GetCount method.
InvalidOperationException Thrown if unable to fetch the record.
See Also