Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A BIG gotcha!
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
A BIG gotcha!
Miscellaneous
Thread ID:
00053471
Message ID:
00053471
Views:
61
I had the following line of code in my main program:
#INCLUDE foxpro.h
The docs say that VFP will search its directory, the directory of the app or down the path for the location of the file following the INCLUDE command. When I test ran a screen to test a Messagebox command that contained MB_OK as the button declaration I was blown out of VFP to WIN95. The crash corrupted my DBC and PJX files to the point that VALIDATE couldn't help the DBC and browsing the JCX was of no help. So, I reconstructed a new project file and added everything back in, including the new DBC. When I attempted to add the existing tables to the new DBC the effort was greeted with a rejection message because the table headers pointed to a "different" DBC (the object id was differrent even though the DBC path and name were the same. When I used the Data Session Window to add the tables as OTHER, I was presented with a message that said I could locate the orginal DBC, or delete the link to it. I tired the location route but ran into the wrong ID problem. So, I deleted the link. This particular table was for a payroll time screen and had over 200 fields in it. These fields were bound to txtboxes on the screen page. Some of them had descriptive names that exceeded 10 characters in length. You guessed it! The names were truncated when the table became a free table by breaking the DBC link. That made some of the fields "redundant" because the first 10 characters of several field names were not unique.

Moral: Unless you write code that never bombs, alway backup your work frequently (every thirty minutes or so) while developing, OR never use fields names longer than 10 char even if the DBC says you can.
Nebraska Dept of Revenue
Reply
Map
View

Click here to load this message in the networking platform