Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP is using wrong table
Message
De
20/09/2000 06:59:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/09/2000 06:14:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00418411
Message ID:
00418415
Vues:
30
>I have a procedure which displays records from a table depending if they match certain requirements set by the user (such date from, date to etc). When a record matches the requirements it is copied to a temporary table. This works most of the time, but, on some occasions VFP is finding itself on the wrong table and when I suspend and do a "? alias()" the name of the temporary table is printed, yet I haven't selected the temp table.
> The source below is one example:
>
>select fixtures
>go top
>do while .not. eof()
> mpos = recno()
>
>* determines whether the record should be copied to the temp table
>
> select fixtures
> go top
> go mpos
> skip
>enddo eof()
>
>An error occured on the "go mpos" saying "record out of range". I suspended and done a "? alias()" and the temp table is selected. AHHHH!, How?
>
>Many thanks to anyone who tries to help in advance.


Mystery seems to lie where you commented :
* determines whether the record should be copied to the temp table
Probably there is code there changing workareas. Better you could code it like :
select fixtures
scan

* determines whether the record should be copied to the temp table

endscan
This would also save you from storing mpos.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform