Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Am I looking at the actual table structure?
Message
De
14/09/2009 23:50:26
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01424398
Message ID:
01424403
Vues:
46
>>Hi,
>>
>>I have made structure changes with table designer on a table which has 18 fields as below:
>>
>>1) Convert field type: I modify 2 of its fields, field#10 and field#11 from type N12.2 to Currency.
>>2) Insertion of fields: I insert 3 new fields immediately after the 2 fields as mentioned in 1)
>>
>>After the structure change, everything seems find either I USE the table and BROWSE it from Command Window or when I try to list the table structure with a Total Commander's plugin (Just in case: Total Commander is a Window Explorer replacement utility) or if I reload the table into the Table Designer and look at its structure.
>>
>>However, if I duoble click the DBF file (of the above mentioned table) from Window Explorer or Total Commander, which launch VFP9 to browse it, I notice that all the 5 fields that I have changed are listed at the end of the browse screen... i.e. it looks like the 2 fields that I have converted and the 3 fields that I have inserted (in the middle of the table) are all actually appended at the end of the table (and the original fields are deleted).
>>
>>My question is:
>>1) When I convert field type or insert fields in the mid of a table, are they actually/ physically being appended at the end of the table?(with the original one deleted), this will make sense if VFP then records their intended logical position in the DBC that holds the table.
>>
>
>It depends on what did you use. If you used ALTER TABLE command, then new fields would be the last. If you used MODIFY STRUCTURE command, then the fields would be where you placed them.
>
>>2) When I double-clicked a DBF file from Window Explorer to browse it in a copy of VFP lanuched, what command is actually issued to browse the table?
>
>It is possible that it uses BROWSE LAST command instead of BROWSE NORMAL. If it uses BROWSE LAST, then you can not trust the sequence of fields.
>
>You can always verify your fields using
>
>AFIELDS(laFields)
>
>display memory like laFields

Hi,

Thanks a lot!
I guess you are right, it uses BROWSE LAST.

I was using Table Designer instead of codes to make those changes, I think Table Designer uses MODI STRU to do the structure change because if I check with afields, the inserted fields are placed at the exact pos where I insert them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform