Add the supplied record to the database with a key defined
by the RecordKey field. This key must be unique.
Namespace: Cognex.VisionPro.DatabaseAssembly: Cognex.VisionPro.Database (in Cognex.VisionPro.Database.dll) Version: 85.1.0.0 (85.1.0.0)
Syntax
Parameters
- record
- Type: Cognex.VisionPro ICogRecord
The record to be added to the database. The key, specified by the RecordKey field, must be unique.
Implements
ICogDatabase Add(ICogRecord)Events
| Event Type | Reason |
|---|---|
| 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
| Exception | Condition |
|---|---|
| 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