Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing/adding Fields in Tables- VFP6 1

Status
Not open for further replies.

taysys

Programmer
Dec 7, 2001
41
US
I am using VFP6.0 sp5, with Codemine 6.1 framework. We have a separate development area from the production directories.

I add fields or change fields in the development environment get all my forms working fine, then need to convert the "live" files. This is where the hassle begins. If I move the DBFs over, then I either lose the fields in the DBF tree in the IDE or I get an error saying that the database fields don't match. So I have to remove the table from the database and the add it back in, then make the field changes again.

Isn't there an easier way to make changes to an existing table once your testing is complete? Thanks!

Bob Taylor
 
HI

Have a DATANEW directory and the DATAOLD directory.

DO the following routine for each of the table.

DO myTableUPG WITH "myTable1"
DO myTableUPG WITH "myTable2"
... etc...
Then move the DATANEW directory to the right place.

************************************************
PROCEDURE myTableUpg
PARAMETERS myTable
*
USE DATANEW\(myTable)
ZAP
APPEND FROM DATAOLD\(myTable) FOR ! DELETED()
USE
RETURN
************************************************
Hope this helps you :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Thank you, Ramani, for the suggestion. I will set this up and give it a try. In an other language I use, I am am able to put an old format file into the development environment and open the dictionary and it will get formatted automatically. I was hoping VFP had a similiar process... using a prg is fine.

Thanks,

BTaylor

 
For a more "automatic" solution of maintaining and repairing databases and tables, consider the Stonefield Database Toolkit ( Many of us wouldn't think of putting a system in the field without it.

Rick
 
Rick,

Thanks for the suggestion. I just sent a proposal to the manager for SDT.

Thanks all.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top