Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Internal structure of DBC property field?
Message
De
26/07/2002 10:48:42
 
 
À
11/07/2002 16:41:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00677061
Message ID:
00682994
Vues:
26
Doug,

I'm sure it's been said before, but..you da man. I did get a working solution (using SDT), but it was a lot less elegant than your suggestion. I'm going to redevelop using the DBCDeleteProp. I'll tell you, the amount of functionality you get for the $ paid on SDT is higher than any other toolkit we use. It makes data structure updates (and fixing corrupted data) so ridiculously easy. We include the DBC and meta data in our EXE, and at start up our app checks to see if the internal DBC has a different checksum than the live data DBC. If so, backs up the data and extracts the new DBC and meta data and calls SDT to update the data structures. It works like a charm, we have hundreds of customers and I can't remember the last time we had a problem with it.

Thanks,
Chris

>Hi Chris.
>
>>I'm looking for some documentation on the structure of the properties field in a DBC file.
>
>Each property in the PROPERTY memo is formatted as follows:
L1 L2 L3 L4 N1 N2 B1 ... Bn VALUE
L1 to L4 represent the length of the entire property. This length is stored as a 4-byte binary number, with the least significant byte in L1. For example, a length of 15 would be stored as 15 0 0 0 (note: this doesn’t mean the digits "1 5 0 0 0", but chr(15) chr(0) chr(0) chr(0)). A length of 260 would be stored as 255 5 0 0.
>
>N1 and N2 represent the length of the ID code for the property. This length is stored as a 2-byte binary number, with the least significant byte in N1. Since all current properties have an ID less than 255, these bytes normally contain 1 0.
>
>B1 to Bn is the ID code for the property stored as a binary number as long as defined in N1 and N2. Since all current properties have an ID less than 255, only 1 byte is normally used.
>
>VALUE is the actual value of the property. Strings are terminated with chr(0).
>
>The PrimaryKey property of a table has an ID of 20 (decimal). To remove this property, you'll need to find the entire "record" for the property in the PROPERTY memo and remove it (easiest using STUFF()).
>
>Hope this helps.
>
>BTW, I see in our database that your company has SDT (albeit an older copy, 5.0). It has a DBCDeleteProp method that will handle this for you. Simply open the DBC as a table, position to the desired table record, and call DBCDeleteProp, passing 20 as the ID for the property to remove.
>
>Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform