Symphony Framework
GenericFileRead Method
Example 
Symphony.dB Namespace > DBAccess Class : GenericFileRead Method
The channel number.
The key value to locate the required row in the database table.
The key number to use to determine the key to search on.
Returned with the data loaded from the database table.
Read a record from the database table.
Syntax
public static int GenericFileRead( 
   int channel,
   string keyValue,
   int keyNumber,
   out string dataArea
)

Parameters

channel
The channel number.
keyValue
The key value to locate the required row in the database table.
keyNumber
The key number to use to determine the key to search on.
dataArea
Returned with the data loaded from the database table.

Return Value

A value of zero (0) is success otherwise an error code.
Remarks
Enables file style managment of a database table. The Generic* methods allow easy migraiton from ISAM style processing to database managment within your application. The GenericFileRead allows you to map the reading of a record/row from the database table.
Example
;;Check if we are accessing data from a database
if (Symphony.dB.DBAccess.GenericDBCheck(channel))
begin
	keyNumber = 0
	if (^passed(key_no)) then
		;;use the passed key number
		keyNumber = key_no
	else
		;;find the key number given the key value
		keyNumber = Symphony.dB.DBAccess.GenericFileKeyCheck(channel, ^argtype(key), ^size(key))

	;;read the "row" from the database
	err = Symphony.dB.DBAccess.GenericFileRead(channel, key, keyNumber, record)

	xreturn
end
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DBAccess Class
DBAccess Members