Hi
It's possible but for me It'is source for other problem.
Do you have any idea what's error in my code?
>>Hi
>>Help please
>>
>>On my form Load I have to open all tables in specific directory (That tables is free tables, not dbc) and on the form unload I have to close the tables.
>>
>>The following code open it but:
>>1. If you run it twice the tables apeared duplicate with aliases as W15,W45 etc.
>>2. 'If used... use in...' not close any table.
>>
>>
local ctbldir,ctabletoopen
>>ctbldir= addbs('C:\DATA\')
>>for i=1 to adir(lafiles, ctbldir+ "*.dbf")
>> ctabletoopen=ctbldir+ lafiles(i,1)
>> if used (ctabletoopen)
>> use in (ctabletoopen)
>> endif
>> if not used (ctabletoopen)
>> use (ctabletoopen) again in 0 shared
>> endif
>>endfor
>>
>>Tnx
>
>Set the datasession of the form to private - all tables will be closed when the form Unload()s
Thank you
Chaim