[V4RB] speeding up UPDATE statements

Wonder Fef wonderfef at noos.fr
Thu Jan 23 13:39:57 CST 2003



Hello all,

I need to update several records (up to 1500 or more) in a go.

As far as I know, I can only do it through a loop of UPDATE statement sent
to the database with a SQLexecute. :

Do

    myValue1 = "some value"
    myValue2 = "more value"
    myID = "abc"

    statement = "UPDATE myTable SET myField1 = '" + myValue1 + "',
        myField2 = '" + myValue2 + "' WHERE ID = '" + myID + "'"

    if myDatabase.SQLexecute(Statement) <> 1 then
        ///
    end if

Loop until somethingMakesItExit

It works fine, but slowly on Mac and *desperately* slowly on Windows.

I'm using RealBasic v4.5.2 and Valentina PlugIn v.1.9.6

Any help would be appreciated.
Thanks in advance
Eric



More information about the Valentina mailing list