Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help! SQLMoreResults() error
Message
 
 
À
24/05/1997 13:40:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00033506
Message ID:
00033521
Vues:
41
>The purpose of SQLMORERESULTS() is to return results of multiple queries
>either synchronously or asynchronously, batch mode or non batch mode.

Thanks. Vladimir... I think I'm understanding this a little more..some of the info in "Microsoft Visual Foxpro 3 -- The Pros Talk" was also helpful.

However, I'm still REALLY CONFUSED by some things. For example:

- When operating in Asynch mode, the only way to tell if a query is done is to keep calling SQLExec() until you get a return value other than 0. This really confuses things, because it makes SQLExec() into a dual-function function!! Is there no some other way to see if an asynch query is still busy? (That's what I originally thought SQLMoreResults was for!!)

- I keep getting INVALID CURSOR STATE odbc errors whenever I do the following steps with a large SQLServer table. Assume 500,000 records. Here are the steps:
1. Set Asynch to .T.
2. Set MaxRecords to 1000 or so (I only want to sample the data. It must be data, not just table structure).
3. Do an SQLExec(nConnHndl,"SELECT * FROM ...")
4. Wait for 1000 records (a source of problems!!!)
5. Do an SQLCancel on the connection. From that point forward, the connection is not usable, you cannot do an SQLDisconnect, and the error is INVALID CURSOR STATE (with internal ODBC error state of 24000).
Why does this happen??? It does not happen if MaxRecords is set to -1.

- How do you check to see how many records have been returned in an Asynch query????? I do a GOTO 1000 and everything hangs until 1000 records have been returned. This works but it seems really stupid.

- Also really interesting: Issuing a GOTO BOTTOM on an asynch query causes data to be returned much, much faster, as if some checkpointing or reporting is bypassed by VFP during its dialog with the ODBC driver. Try it and see! But why does this happen?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform