Symphony Framework
GenericFileKeyCheck Method
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.
public static int GenericFileKeyCheck( 
   int keyType,
   int keyLength


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

Return Value

Returns the key number to use.
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.
if (^passed(key_no)) then
	;;use the passed key number
	keyNumber = key_no
	;;find the key number given the key value
	keyNumber = Symphony.dB.DBAccess.GenericFileKeyCheck(channel, ^argtype(key), ^size(key))

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


DBAccess Class
DBAccess Members