Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 1 of 1

Thread: RTECALL: next

  1. #1
    Senior Member fid509's Avatar
    Join Date
    Feb 2002
    Location
    Brussels
    Posts
    380

    Default RTECALL: next

    Versions
    All

    Purpose
    Go to the next record.

    Syntax
    Code:
    $L.success.flag=rtecall("next", $L.rc, $L.filevar)
    • $L.success.flag
      true = success
      false = failure
    • $L.rc
      returncode of the call
      0 = next record found
      1 = end of list reached
    • $L.filevar
      the variable in which to store the records retreived, updated or added

    Example
    Code:
    $L.success.flag=rtecall("rinit", $L.return.code, $L.filevar, "operator") 
    $L.query="name#\"A\"" 
    $L.success.flag=rtecall("select", $L.return.code, $L.filevar, $L.query)
    if ($L.return.code<3) then (while ($L.return.code.next~=1) do (password in $L.filevar="new_password";$L.success.flag=rtecall("rupdate", $L.return.code, $L.filevar);$L.success.flag=rtecall("next", $L.return.code.next, $L.filevar)))
    Initialises the operator file in filevariable $L.filevar. Select all operators starting with A. Check if the query returned al least one record and start looping with a do-while through the retrieved recordlist to update each password.
    Last edited by fid509; 2007-05-05 at 11:06. Reason: put loop into the update/next rtecall, otherwise it only updated the first record.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts