ICogDatabase Add Method Cognex VisionPro 9.20
Add the supplied record to the database with a key defined by the RecordKey field. This key must be unique.

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

void Add(
	ICogRecord record
)

Parameters

record
Type: Cognex.VisionPro ICogRecord
The record to be added to the database. The key, specified by the RecordKey field, must be unique.
Events

Event TypeReason
DatabaseAddingEvent Fires at the start of a call to this method.
DatabaseAddedEvent Fires at the end of a call to this method.
VisionProChangedEvent Fires when this method changes the values returned by GetCount and GetKeys.
Exceptions

ExceptionCondition
ObjectDisposedException Thrown if this object has already been disposed.
InvalidOperationException Thrown if not currently connected.
ArgumentNullException Thrown if the input argument, record, is null.
ArgumentException Thrown if the key is not unique.
InvalidOperationException Thrown if unable to add record.
See Also