Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Performance to SQL Server
Message
De
16/05/1998 12:20:12
 
 
À
15/05/1998 16:51:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00098935
Message ID:
00099929
Vues:
23
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform