>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.