RevDB performance, can I do this better?

Dreamscape Software webmaster at dreamscapesoftware.com
Thu Apr 25 13:51:01 EDT 2002


> put URL theFile into theData
> put 1 into theCount
> put the number of lines of theData into totalRecords
> repeat foreach line theLine in theData
>     put count+1 into theCount
>     revDB_execute(gConnectionID,theLine);
>     put theCount into field currentRecords
> end repeat

I may be reading this wrong, but I would handle the script like this...

    put url theFile into theData
    repeat with x=1 to (the number of lines in theData)
        revDB_execute(gConnectionID,x)
        put x into field "currentRecords"
    end repeat

I'm writing this assuming that x = theLine
(revDB_execute(gConnectionID,theLine)).  If x is the actuall line data, then
I would do the following...

    put url theFile into theData
    repeat with x=1 to (the number of lines in theData)
        revDB_execute(gConnectionID,(line x of theData))
        put x into field "currentRecords"
    end repeat

Derek Bump
Dreamscape Software, Inc.
http://www.dreamscapesoftware.com/




More information about the use-livecode mailing list