Returns an instance of an object from this collection using a distinct value as specified by DistinctFieldName. If Subset has been implemented then the objDistinctValue need only be unique within the subset specified, not the entire database table.

Namespace: DatabaseObjects
Assembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0

Syntax

C#
protected IDatabaseObject Object(
	Object objDistinctValue
)
Visual Basic
Protected Function Object ( _
	objDistinctValue As Object _
) As IDatabaseObject
Visual C++
protected:
IDatabaseObject^ Object(
	Object^ objDistinctValue
)

Parameters

objDistinctValue
Type: System..::..Object
The value that uniquely identifies the object within this collection. This is the value of the field defined by this collection's DistinctFieldName function.

Return Value

IDatabaseObject (DatabaseObjects.IDatabaseObject)

Examples

Loads a product using a product ID of 123
CopyC#
Dim objProduct As Product = MyBase.Object(123)

See Also