>>>I need to know exactly when the tables are closed after unloading the servers.
>>>The tables are updated the data in the following way:
>>>Indexes are added some to a copy of the table.
>>>Some data massaging is done to a copy of the table.
>>>The servers are unloaded.
>>>The old tables are deleted and the table copies are renamed as the old tables.
>>>The servers are brought back up.
>>>I know there are other ways to handle this, but budget constraints prevents us from looking at other avenues at this time.
>>>
>>>How can we know with certainty that all tables have been released so that can be opened exclusively, if need be.
>>>
>>>TIA
>>
>>Dan,
>>You could do a adir() then try to fopen() RW in a loop.
>>
>>ie (roughly):
>>
>>lnTables = adir(arrTables,mypath+'*.dbf')
>>for ix=1 to lnFiles
>> handle=fopen(myPath+arrTables[ix,1],12)
>> if handle<0
>> exit
>> endif
>> fclose(handle)
>>endfor
>>llInUse = (ix<=lnTables)
>>
Cetin
>
>
>I might end up doing something like that, although in our case there are 7 directories that I would need to check. It needs to be very fast. How long will that take?
Dan,
Very roughly 0.01 secs per file. However it's affected by factors like directory crowdness. ie: A 100 dbf files in a directory where total 1000 files exists would read slower than a 200 dbf files where total file count is 250.
Cetin