DbServer.FieldGet Method (Typed) | |
Get the contents of a field that is identified by its position.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD FieldGet(
uField AS USUAL
) AS USUAL
public override Usual FieldGet(
Usual uField
)
Request Example
View SourceParameters
- 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 |
---|
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 64KB. For BLOB fields longer than 64KB, 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:
1LOCAL nFieldPos := 1, FName, FVal
2LOCAL oDBCust := Customer{} AS DBServer
3
4FName := oDBCust:FieldName(nFieldPos)
5FVal := &FName
6
7FVal := oDBCust:FieldGet(nFieldPos)
8FVal := oDBCust:FieldGet( #Fname )
9Fval := oDBCust:FieldGet( "Fname" )
See Also