Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems whit a Grid
Message
From
20/08/1999 20:30:20
 
 
To
20/08/1999 18:09:51
Arturo Valdez
SAYD - Software, Asesoria Y Desarrollo
Culiacán, Mexico
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00256100
Message ID:
00256134
Views:
24
>How i can show a tamporal file in a grid ?
>
>i create my temporal file with sys(2015), if i save this name to a public variable , i try to put the variable memory in the propierty "Recorsource" of the Grid but dosnt work....

I think you mean you have a cursor. Since your temporary file is open like a data table, you simply put it's name as the RecordSource for the grid.

So you need to open what ever that temporary file is:

mytempname = SYS(2015)
* write data to file here
USE (mytempname) ALIAS tempdata
oForm.oGrid.RecordSource="tempdata"

You may find it easier to just use the CREATE CURSOR command. That way, you do not need to concern yourself with what the name of the file on the disk is, you just use it's name.

CREATE CURSOR tempdata (field1 C(10), field2 D,...)
* populate cursor tempdata with whatever
oForm.oGrid.RecordSource="tempdata"

Another advantage to a cursor is you don't have to clean up the temporary file on the disk, FoxPro will take care of that when you close the cursor with USE IN tempdata.

The name on disk of "tempdata" may be something like "Y1234567.TMP". You can find out what it's called by using DBF("tempdata"), if you really need to know.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform