Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

DevSeek

  • Last UpdatedJul 18, 2023
  • 1 minute read

Moves the device pointer to a specified position in the device. If the device is a database, and it is opened in indexed mode, DevSeek will seek to the record number - not through the index. To locate the first record in an indexed device, call the DevFirst function.

Syntax

DevSeek(hDev, Offset)

hDev:

The device handle, returned from the DevOpen() function. The device handle identifies the table where all data on the associated device is stored.

Offset:

The offset in the device. If the device is a database device, the offset is the record number. If the device is a binary device, the offset is in bytes (from 0 to the maximum file size -1).

Note: If offset causes a seek past the end of the file, DevSeek returns no error, but sets the EOF flag (that is, a subsequent DevEOF call will return true). For SQL devices, the function can use only either 0 or 1 offset (beginning of the table).

Return Value

0 (zero) if the seek was successful, otherwise an error code is returned.

DevOpen, DevEOF, DevRecNo, DevFirst

Example

hDev=DevOpen("Log", 0);
DevSeek(hDev,100);
DevGetField(hDev,"Tag");
! Gets the value of the "Tag" field at record 100.

See Also

Device Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in