Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restore cursor after scan
Message
De
21/01/2018 04:33:04
 
 
À
21/01/2018 04:19:08
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01657368
Message ID:
01657405
Vues:
45
>>Use the SQL command Update instead. I do it regularly, never fails.
>>
>>lnRecno = recno('bi')
>>Update bi set something = anotherthing where myref='AA'
>>Goto lnRecno in bi
>>Yourgrid.refresh()
>>Yourgrid.setfocus()
>>
>>>Hello comunity,
>>>
>>>I need to restore cursor position on Grid after doing a Scan to this inicial position , example:
>>>
>>>
>>>select bi
>>>mypos = recno()
>>>
>>>select bi
>>>scan
>>>IF myref  = 'AA'
>>>replace something with anotherthing
>>>Endif
>>>endscan
>>>
>>>Go record mypos
>>>
>>>
>>>But don´work.
>>>
>>>Someone could give me help about how do that.
>>>Many thanks
>>>Luis
>
>That would fail with an error if the record pointer is at EOF() beofre the update
>Better to use
>
>
LOCATE RECORD MyPos
>
>Walter,

Well, that will only happen if the previous command was Append, or the user used a keyboard shortcut to do the same. Since the OP wrote that he already was "in" a grid, I don't think that's relevant. But I agree, your fix is better.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform