Sets the field value for the database record associated with the object and collection.

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

Syntax

C#
public void ObjectSetFieldValue(
	IDatabaseObjects objCollection,
	IDatabaseObject objItem,
	string strFieldName,
	Object objNewValue
)
Visual Basic
Public Sub ObjectSetFieldValue ( _
	objCollection As IDatabaseObjects, _
	objItem As IDatabaseObject, _
	strFieldName As String, _
	objNewValue As Object _
)
Visual C++
public:
void ObjectSetFieldValue(
	IDatabaseObjects^ objCollection, 
	IDatabaseObject^ objItem, 
	String^ strFieldName, 
	Object^ objNewValue
)

Parameters

objCollection
Type: DatabaseObjects..::..IDatabaseObjects
The collection that the object exists within. The function utilises the collection's subset and tablename to determine which table and record to modify.
objItem
Type: DatabaseObjects..::..IDatabaseObject
The object which represents the database record to be set. Specifically, the object's distinct field name is used to determine which record to modify.
strFieldName
Type: System..::..String
The name of the database field that is to be set.
objNewValue
Type: System..::..Object
The new value that the database field it to be set to. If Nothing/null then the field is set to NULL.

Exceptions

ExceptionCondition
DatabaseObjects.Exceptions..::..ObjectDoesNotExistExceptionIf the object has not already been saved

See Also