AndrewMozley
Programmer
An application has been issued to several customers, and the underlying structure of one table needs to be altered (by program), to match the new layout. The changes are mainly the addition of new fields and changing the length of some fields.
I can do this up to a point by opening the live data and the new template, examining the fields in both tables with the AFIELDS() function; then using the ALTER TABLE command to add the new fields into the live data.
This works, and the application runs, using the new fields. However the fields in the live data may not be in the same order as those in the template.
So : the (existing) live data has fields :
Account C(8), Addr1 C(30), Postcode C(8)
and the new template has fields :
Account C(8), Addr1 C(30), Addr2 C(30), Postcode C(8)
After updating the live data, it has fields :
Account C(8), Addr1 C(30), Postcode C(8), Addr2 C(30)
As mentioned, the live data has all the fields to make the updated application work, but it would be nice to have the layout identical to the new template, with the fields in the same order.
Thanks.
I can do this up to a point by opening the live data and the new template, examining the fields in both tables with the AFIELDS() function; then using the ALTER TABLE command to add the new fields into the live data.
This works, and the application runs, using the new fields. However the fields in the live data may not be in the same order as those in the template.
So : the (existing) live data has fields :
Account C(8), Addr1 C(30), Postcode C(8)
and the new template has fields :
Account C(8), Addr1 C(30), Addr2 C(30), Postcode C(8)
After updating the live data, it has fields :
Account C(8), Addr1 C(30), Postcode C(8), Addr2 C(30)
As mentioned, the live data has all the fields to make the updated application work, but it would be nice to have the layout identical to the new template, with the fields in the same order.
Thanks.