Click or drag to resize

DbServer.FIELDGET Method

Get the contents of a field that is identified by its position.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.5
Syntax
 VIRTUAL METHOD FIELDGET(
	uField AS USUAL
) AS USUAL

Parameters

uField
Type: Usual
The name, number, or symbol representing the desired field.

Return Value

Type: Usual
The value of the specified field.  If <nFieldPos> does not correspond to the position of any field in the current data server, DBServer:FieldGet() returns NIL.
Remarks
DBServer:FieldGet() retrieves the value of a field using its position within the database file structure rather than its field name.  Within generic database service functions this allows, among other things, the retrieval of field values without use of the macro operator.
Tip Tip
DBServer:FieldGet() can be used with a BLOB field (that is, a memo field associated with a BLOB file), provided the length of the field does not exceed 64 KB.  For BLOB fields longer than 64 KB, use DBServer:BLOBGet() instead.
Examples
This example compares DBServer:FieldGet() to functionally equivalent code that uses the macro operator to retrieve the value of a field:
X#
1LOCAL nFieldPos := 1, FName, FVal
2LOCAL oDBCust := Customer{} AS DBServer
3// Get field value using macro operator
4FName := oDBCust:FieldName(nFieldPos)
5FVal := &FName
6// Get field value using FieldGet()
7FVal := oDBCust:FieldGet(nFieldPos)
8FVal := oDBCust:FieldGet( #Fname )
9Fval := oDBCust:FieldGet( "Fname" )
See Also