Link to home
Start Free TrialLog in
Avatar of Dee
DeeFlag for United States of America

asked on

Case of disappearing field .. Foxpro 5 :(

I am trying to add a field to a Foxpro table, as I have done before.

The field is saved, I run the program once - no issue.  The field is populated.  Then the field disappears! And the program crashes. "Variable not Found"

I have tried it both within the Table Designer and with the following code:

USE c:\vetdata\ckBreedScrub.dbf excl
alter tABLE c:\vetdata\ckBreedScrub ADD COLUMN defaultdir c(30)

The table has 114 fields, so it is not maxed out according to Foxpro's limitations.

This is insane.  Now I am insane after 2 hours of FRUSTRATION trying to simply add a simple field!

Attached are screen shots of errors, etc.  I am baffled.  And now I've spent another 20 minutes making screen shots and posting this.  AARGH!
TableProperties1.jpg
TableProperties2.jpg
PopulatedTable.jpg
Variable-Not-Found.jpg
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dee

ASKER

hmmm ... hmmm... ok, so  I AM SO STUPID !   Again !   Still !

The code is creating a new ckBreedScrub table every time it runs from a template, required for weekly production for a particular mail file in a particular directory.

USE c:\vetdata\templates\ckBreedScrub.dbf
select ckBreedScrub
COPY STRUCTURE TO c:\vetdata\ckBreedScrub.dbf

What I needed to do was modify the structure of the template table, which I had done once before.  Brain hiccup!  I was modifying the table that was created by the code, and overwritten each time it ran.  Crappola.

I love you pcelba! lol
Avatar of Dee

ASKER

And thank you so much!
You are welcome! If everything would be so simple...