Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Am I looking at the actual table structure?
Message
 
 
To
14/09/2009 22:55:42
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01424398
Message ID:
01424402
Views:
54
>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
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform