Symphony Framework
GenericFileKeyCheck Method
Example 
Symphony.dB Namespace > DBAccess Class : GenericFileKeyCheck Method
The key type. (1) is Alpha, (2) is Decimal.
The length of the key value.
Method to determine which key to access the table with depending on the type and size of the passed key value.
Syntax
public static int GenericFileKeyCheck( 
   int keyType,
   int keyLength
)

Parameters

keyType
The key type. (1) is Alpha, (2) is Decimal.
keyLength
The length of the key value.

Return Value

Returns the key number to use.
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 READ operation on an ISAM file allows you to "suggest" the key to use. The suggested key is based on the type and size of the key value being used. The GenericFileKeyCheck allows you perform the same key suggesting logic prior to attempting to read data fom the database table. The routine will use the key type and key length to try to match against a key in the database table. If a match is found then that key (number) is used. If not the primary key is used.
Example
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))
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