FirstRestrictionRecord gets the first open RMS file record marching all the registered restriction expression and stores it in internal buffer


Function FirstRestrictionRecord (rmsHandle As Integer, rhiloflag As Integer) As Integer



RMS file handle


Next record search direction

Return Values

On success, FirstRestrictionRecord returns 1.  If failed, it returns 0.


FirstRestrictionRecord selects a index to use to search the first matching record based on the registered restrictions.  It returns a next record search direction (forward/backward) through rhiloflag passed in as the second parameter.  If the restriction operator is LE/LT the direction is backward or if the restriction operator is GE/GT the direction is forward.  The returned rhiloflag must be passed to NextRestrictionRecord to get the next matching records.

To get fields data:

If function RegisterFieldRegisterField is not called, first call GetFieldCountGetFieldCount to get the number of fields in

the RMS file then for each field call GetFieldTypeGetFieldType and GetStringFieldGetStringField, GetCharFieldGetCharField,

GetIntegerFieldGetIntegerField, GetLongFieldGetLongField, GetRealFieldGetRealField, GetMoneyFieldGetMoneyField, GetDateFieldGetDateField,

GetTimeFieldGetTimeField, GetBooleanFieldGetBooleanField depends on the field types.

If function RegisterFieldRegisterField is called, call FirstRegistedFieldFirstRegisteredField and NextRegistedFieldNextRegisteredField to get

the field names corresponding to the field data in the query buffer and for each field name call

GetFieldTypebyNameGetFieldTypebyName and GetStringFieldbyNameGetStringFieldbyName, GetCharFieldbyNameGetCharFieldbyName,

GetIntegerFieldbyNameGetIntegerFieldbyName, GetLongFieldbyNameGetLongFieldbyName, GetRealFieldbyNameGetRealFieldbyName,

GetMoneyFieldbyNameGetMoneyFieldbyName, GetDateFieldbyNameGetDateFieldbyName, GetTimeFieldbyNameGetTimeFieldbyName and

GetBooleanFieldbyNameGetBooleanFieldbyName depends on the field types.

See Also

AddStringRestrictionAddStringRestriction, AddCharRestrictionAddCharRestriction, AddIntegerRestrictionAddIntegerRestriction,

AddLongRestriction, AddRealRestrictionAddRealRestriction, AddDateRestrictionAddDateRestriction,

AddTimeRestriction, AddBooleanRestrictionAddBooleanRestriction, GetFieldTypeGetFieldType,

GetFieldTypebyName, AddStringRestriction