Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IsFreeTable()...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00289757
Message ID:
00289781
Vues:
27
>>I have an application in development that distributes client-side data as an application with the master tables,the DBC and all data access methods and business rules compiled in the application.
>>
>>When an application object is created...
>>
>>loData = NEWOBJECT("Data_Space","Client_Data.App")
>>
>>two transaction tables are created as members of the DBC. If the tables already exist I want to validate they have not been freed from the DBC.
>>
>>Because the DBC is included inside the application file when I try to open the transaction table from outside of the object VFP prompts me to locate the DBC (can't be done - which is what I want) or delete the link (Free the Table - which I don't want).
>>
>>I want a method that verifies none of the tables in the DBC have been made free tables which will be called from the Init of the "Data_Space" object. The OpenDataBase method uses the arguments - EXCLUSIVE VALIDATE. The VALIDATE checks to see that tables and indexes referenced in the database are available on disk. VFP also checks to see that referenced fields and index tags exist in the tables and indexes. It doesn't check to see if any of the tables have been made free.
>>
>>I am looking for a IsFreeTable function that reads the header of the table. I believe the RECCOUNT(), RECSIZE() and FSIZE() retrieve this information from the header?
>>
>>Any ideas are appreciated.
>>
>>Thanks,
>Hi Bill,
>
>Will
>lcdbc = CURSORGETPROP('Database')
>llisfree = EMPTY(lcdbc)
work?

Hey George,

That will do the trick. I just put the code in a loop of an ADBOBJECTS(laTableArray,"TABLE") array and verify all tables in the database at startup. The only downfall is having to open very table to check but I can live with it.

Damn fast response...

Thanks,
Bill
Heavy Metal Pedal - click with care
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform