Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need excl use of tables after servers unload
Message
De
12/01/2002 06:54:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/01/2002 13:40:13
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Divers
Thread ID:
00603632
Message ID:
00603895
Vues:
20
>>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform