Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index on sqlpassthrough cursor failing?
Message
De
06/04/2006 14:24:26
 
 
À
06/04/2006 13:48:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP3
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01111127
Message ID:
01111151
Vues:
13
I tested this some more and can reproduce consistently. When running through the debugger the seek succeeds, when running through runtime, the seek fails. I have the wait window 'no landed cost' in there now.




>I am getting inconsistent results on a report, against the same data. When I ran my report through vfp runtime I got one set of data. When I ran it through the VFP debugger, I got a different result. I am wondering whether the execution delay of the debugger is what solved the problem.
>
>I create a sqlpass through cursor. Then I index it. Then I do a loop that has a seek that utilizes the index. In the code below, originally I didn't have the wait window 'no landed cost', so I don't know if the seek was failing. I alos didn't have the 'Please wait to see if this helps' wait window.
>
>The short of it is that I **THINK** that the seek didn't find the records it should have in curlcosts, because at the end of processing the loop, nlucst was 0.
>
>When I put the wait window 'Please waiting to see if this helps'. Then the seek succeeded.
>
>Is it even remotely possible that even though VFP moves on past the index on statement, when there is no wait window, that the index is not fully written? It's not that the seek line actually fails... there is no error message, it's just that when done, nlucst is 0, and I'm INFERRING that the seek failed. (I didn't have the other wait window in place before)
>
>This seems to be an intermittent problem. So it's hard to debug.
>
>
>lnresult=sqlexec(osystem.ncomhandle,lcPOCostSQL,'CurLCosts')
>index on citemno tag xcitemno
>WAIT WINDOW 'Please waiting see if this helps' TIMEOUT 4
>
>
>
>select curreport
>go top in curreport
>do while not eof('curreport')
> if seek(curreport.citemno,'CurlCosts','xcitemno')
> replace curreport.nucst with curlcosts.nucst in curreport
> replace curreport.nulcst with curlcosts.nlucst in curreport
> ELSE
> *WAIT WINDOW 'no landed cost found for ' + curreport.citemno TIMEOUT .5
> replace curreport.nucst with curreport.ncost in curreport
> endif
>
> skip in curreport
>enddo
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform