| THE META-HTML LANGUAGE REFERENCE MANUAL

| [TOC] |

## Manual Page Viewer

Name: DATABASE-NEXT-KEY

Section: Database Commands

Synopsis:

`<database-next-key DBVAR AFTER-KEY>`

Description:

Return the "next" key in the database. The key is found by looking at AFTER-KEY, which makes this function suitable for calling in a loop. For example, the following code iterates over an entire database.

    <with-open-database db /file.db mode=read>
      <set-var key=<database-first-key db>>
      <while <get-var key>>
        <package-delete record>
        <set-var loaded? =
          <database-load-record db <get-var key> package=record>>
        Key: <get-var key>, Name: <get-var record::name>
        <set-var key = <database-next-key db <get-var key>>>
      </while>
    </with-open-database>

Edit Pointer
Function Index
Variable Index
Variable Editor

The META-HTML Reference Manual V1.4 Copyright © 1995, 1996, Brian J. Fox, 1996, 1997 Universal Access Inc.
Found a bug? Send mail to bug-manual@metahtml.com