Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Performance to SQL Server
Message
From
16/05/1998 12:20:12
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00098935
Message ID:
00099929
Views:
22
See if cleaning up your code makes a difference. Remember that fox code is interpreted and is not optimized. It is best to leave any counting and comparisons up to the database engine. These changes will speed up your fox code.
******

hnd = sqlstringconnect(...)
=sqlsetprop(hnd, "transactions", 2)  && manual transactions

* the following is moved outside of the loop
csql = "insert into table (field1, field2, field3, ...) " + ;
   "values (?localtable.field1, ?localtable.field2, ?localtable.field3, ...)"

select localtable

do while !eof()

    scan next 2000 && let fox count for you
        =sqlexec(hnd, csql)
    endscan

    =sqlcommit(hnd)

enddo
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform