Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSession troubles.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00457954
Message ID:
00458039
Vues:
26
Hi Doru,

Ok, I re-read help on Lookup() and probably this function would not help you. Anyway, there is a simple solution to your problem (it's similar to Bill's idea, but even simpler): (see my inserts in bold)

>
Function CallMe (part of our standard procedure)
>Parameter tcEmpno

<b>use people again in 0 alias LookupPeople shared noupdate && doesn't change area</b>
<b>if seek(tcEmpno, "LookupPeople","Empno")</b>
  lcCallMe=iif(empty(LookupPeople.termdate),'','*')+trim(LookupPeople.callname)+' '+LookupPeople.empname
else
  lcCallMe=''
endif
<b>use in LookupPeople && Close this table </b>
>return lcCallMe
As you can see, this way you stay in the current alias and you don't move record pointer in any of your open tables, because all work is done in a separate work area...

>The errors that we get:
>- Using CallMe() in a form: ‘Cannot access selected table’. Callme() used in the refresh of 2 textboxes. Error pops up while skipping back and forth, it is related to the speed of clicks on the next/previous. Dbf() returns ‘people’ every time the error occurs…
>- Using CallMe() in a report called from a form – Invalid page fault in VFP
>
>The form’s datasession is private, and we do not have anything in the DE of the report.
>
>In both cases the errors do not always occur, but in the second case it occurs almost always.
>
>If we do not use a new data session in CallMe, everything is all right.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform