Read URL Records
900-FIND-BEGRNG-URL-<FileName> and 900-FIND-NXTRNG-URL-<FileName> routines are used to read URL records.
The 900-FIND-BEGRNG-URL-<FileName> API is used to define search parameters for a set of URL records associated with the current base file record, open the result set and retrieve the first record of the set.
The URL<Prefix>-URL-ORDER
field controls both the order in which URLs are returned and the keys used to search for the URLs.
URL-ORDER
= 0 is the default and orders the URLs by NAME and sequence number (SET5). If the NAME field is not blank, only URLs with matching NAME values will be returned.
URL-ORDER
= 1 orders the URLs by CREATE-DATE, CREATE-TIME and sequence number (SET6). If the Ath->CrtDate and Ath->CrtTime fields (internal C fields that 4GL programs do not directly control) are not blank, only URLs that match both will be returned. If Ath->CrtDate is not blank and Ath->CrtTime is blank, then only URLs that match that date are returned.
URL-ORDER
= 2 orders the URLs by MODIFY-DATE, MODIFY-TIME and sequence number (SET7). If the Ath->ModDate and Ath->ModTime fields (internal C fields that 4GL programs do not directly control) are not blank, only URLs that match both will be returned. If Ath->ModDate is not blank and Ath->ModTime is blank, then only URLs that match that date are returned.
URL-ORDER
= 3 orders the URLs by sequence number (SET3).
The URL<Prefix>-TYPE
field can be used to search for specific types of URLs. If URL<Prefix>-TYPE
= ' ' (space), then all URLs are retrieved. If the field is set to a different value, then only URLs of that type are returned.
The 900-FIND-NXTRNG-URL-<FileName>
API is used to retrieve subsequent records from the result set. The value of the URL<Prefix>-TYPE
field must be set to the appropriate value before each call to 900-FIND-NXTRNG-URL-<FileName>
.
The name stored with the URL is that of the user who created the URL attachment.
Programming Examples
This code shows how to read all of the URL records associated with COMPANY 1000 ordered by NAME and sequence number.
|
This code shows how to read all of the URL records associated with COMPANY 1000 of TYPE = "H" where NAME = "Company Home Page" ordered by NAME and sequence number.
|
This code shows how to read all of the URL records associated with COMPANY 1000 ordered by CREATE-DATE, CREATE-TIME, and sequence number.
|