Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record
Message
De
06/07/2011 08:54:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/07/2011 02:43:04
Muthu Vel
Sty Company
Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Re: Record
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01517382
Message ID:
01517411
Vues:
43
>I have three form(dataentry.scx, search.scx,report.scx) in the dataentry form of int event i written "thisform.txtregno.value = regno". let assume when i am in the 50 record for data entry, at the time i want to search the record for one enquiry so i simply click the search button in the dataentry form, the search form will open find the record. then i exit from the search form the dataentry form will open, the txtregno display first record of my table but i want to display 50 record of my table because i already entered the data from 1 record to 49 record.
>
>how to do this?

Two ways to do this:

1) Restore the record pointer after searching:
local lnRecno
lnRecno = recno()
llDuplicate = seek([some expression])
goto (lnRecno)
2) Re-open the table with a different name.
local lnSelect
select 0
use MyTable again order [some index tag]
llDuplicate = seek([some expression])
use
select (lnSelect)
The second method is safer, in that everything is maintained in the table you are editing: especially record pointer and index. Also, you won't have problems with buffering, which you may have with the first method, depending on the buffering mode used.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform