Re: EDS Autonumber

new topic     » goto parent     » topic index » view thread      » older message » newer message

> Has anyone got a way of generating an autonumber under the native eds sys=
tem?

I use something similar to this. Keys start at one. When generating a
new key, it grabs the last (and highest) then returns the next number.
If the table is empty, it returns 1, the first key.

global function db_next_key()

    integer count

    count = db_table_size()
    if count = 0 then
        key = 0
    else
        key = db_record_key( count )
    end if

    return key+1
end function


HTH,
~Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu