Thank you Sergey (as always), I learn something today.
>>Today my way of expression is horrible (not that other days is not) :o)
>>You said that SELECT-SQL doesn't use already opened files, but if I run something like SELECT * FROM MyTable INTO CURSOR cTest and then open Data Session window, there is 2 aliases there - MyTable and cTest, but if do something like:
>>
>>USE MyTable
>>SELECT * FROM MyTable INTO CURSOR cTest
>>
>>and open Data Session window again only 2 aliases are there - MyTable and cTest, there is no addional alias like "B" or "MyTable_B". That is why I think SELECT-SQL uses already opened tables.
>
>If table is not open before a query, VFP'll open it and use in a query. It stays open after query is completed.
>If a table is already open, than VFP will open it similar to USE AGAIN with a temp alias and use it in a query. Such tables open by VFP with temp aliases are closed after the query is completed.
>
>You can see it yourself by creating a simple UDF and running following query (you can use any tyable instead of mytable)
>SUSPEND
>RETURN "A"
>...
>SELECT *, myudf() ;
> FROM mytable ;
> INTO CURSOR temp
>
Run query twice. First time with mytable claused and second open before query and anylize all workareas in the Datasession window.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.