Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow ADODB command object initializing
Message
De
20/04/2001 15:23:07
Christian Cote
Les Logiciels Onoma Inc.
Longueuil, Québec, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Slow ADODB command object initializing
Divers
Thread ID:
00498090
Message ID:
00498090
Vues:
54
HI,
I need to perform distincts counts on tables. For that I initialize an array of tables that I traverse with a FOR loop. My problem occurs when I try initialize the fields commnadtext property of the Command Object. The text goes a bit lijke this
CMD.COMMANDTEXT =
"INSERT INTO STAGEDB.TO_STATS_FIELDCOUNTS VALUES ( " + ;
STR(iTableId) + ", " + ;
STR(IIf(IsNull(rsMax.Fields(0).Value), 1, (rsMax.Fields(0).Value + 1))) + ;
",'" + rs.Fields(i).Name + ;
"'," + STR(rsFldCounts.Fields(i).Value) + ",'" + strSystemChosen + "')"

that gives something like this :
"INSERT INTO STAGEDB.TO_STATS_FIELDCOUNTS VALUES ( 110, 10,'SNAPSHOT_DATE', 1,'PMDB')"

After that I simply issue cmd.execute to insert the values into Oracle. My problem is that when the CMD.COMMANDTEXT line is executed, VFP stops for a few seconds (minutes). If it were stopping at the CMD.EXECUTE line, I would simply use a DO WHILE CMD.STATE = ... to know wheter the line is executing or not and if yes issue a DOEVENTS command to send it to background and display to the user wich table is being processed.

Finally, my question is : why does the program stops when I initialize teh CMD property and how can I avoid this. I had the same behaviour in VB/VBA.

Thnak you for your help,
Christian Cote
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform