Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data environment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00122709
Message ID:
00122926
Vues:
13
>1) If a table is open in the data environment, do I need to open it anywhere in my code? If I don't have a use filenmame before a seek I get a message saying no table is open.

No need. Just be sure that when seeking, just specify the assigned alias of a table opened in the DE (default is the table name).


IF SEEK(cvar,"mytablealias","myindexkey")
DO blah..blah...
ENDIF
>
>2) I then do a seek & copy some records to another table. Then I do a use newtable and index that table. The index doesn't seem to work. Do I have 2 open tables but the one I named in use is the active table?

What is your syntax/command in copyring some records to another table? Is it append from, scan..seek,append blank, replace..endscan? Where did you create the index in the new table? Is it in the command window, table structure window, or included in your program?

>
>3) I want to then display some data on the screen & allow the user to page up, page down, and then escape. I don't want the user to be able to edit, add or delete records. Is this a BROWSE or a grid? I'm coming from a DOS background & may be thinking DOS.

You can make use of command buttons with captions: top, prev, next, bottom, edit, add, and its button should have corresponding command to move the pointer, edit, or insert record in the click event.

Grid totally supersedes browse in OOP methodology as browse don't have properties work with.

Click event of top button :

GO TOP
Thisform.Refresh()

Click event of prev button:

SKIP -1
Thisform.Refresh()

Click event of next button:
SKIP
Thisform.Refresh()

Click event of bottom button:
GO BOTTOM
Thisform.Refresh()

Click Edit button
Enable the controls

Click Add Button
Enable the controls
APPEND BLANK
DO replaces here...
Thisform.Refresh()

That's the basic workarounds, you can add some functionality from their.

>Basically I want a report to the screen for certain entered parameters (date range being one).

We do use SQL commands to come out with a result set based on parameters or variables.

SELECT blah... FROM table WHERE mydatefield1 >= begindate AND mydatefield1 <= enddate INTO CURSOR temptable

SELECT temptable
REPORT FORM myreportform PREVIEW

>Thanks.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform