Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This is a weird one!
Message
From
01/10/1999 20:26:27
 
 
To
01/10/1999 20:14:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00271823
Message ID:
00271832
Views:
18
>>

I have a Customer table (cust.dbf) with 286 Records; I used the ComboBox builder to create a "ComboBox". I have an Invoice, Job, and Quote form that use the cust table as anyone would in an RDBMS, I use the combobox to retrieve the customer's ID from the cust table. I than store that value in the respective header file (InvHD.dbf, JobHD.dbf, etc.) which is linked to the cust.dbf file. Simple enough huh?
>>
>>OK this is were it gets strange, on my forms I have an ADD, and EDIT button. If the current record in any of the *HD.dbf files has the "custid" of "SWFT" (Which is Swift-Eckrich) and I hit the EDIT button I get an error like, "variable 'CLS' not found". If I'm on a record were the custid is something other than "SWFT" all works as it always has.
>>
>>I would suspect an index problem, right? So lets reindex all the tables used on these forms... Same thing still happens, Delete and recreate all indexes for the related tables... Same thing, Pack the tables... same thing. Scan the tables with FoxFix, no problems reported... same thing still happens. Start to think there has to be something wrong with the cust.dbf file itself, in someway, somehow. So I export all the data to a delimited text file, Import it into a low-end Database (Access J) export to an Excel 5.0 spreadsheet, and import back into Visual FoxPro 5.0 as Cust2.dbf and rename to Cust.dbf, after I remove, delete the old table. Guess what, Same Thing. Delete the culprit record, pack, and add a new record to replace it with identical information... Same Thing. Rename the CustID to "SWFT1" as I already have "SWFT2-SWFT8", Replace the referencing field in all the header files to "SWFT1"...Same Thing. Almost to the point of
>>calling Microsoft now, but realize I would probably get a better answer to my problem from the UT. Going to try one last thing, Add in a record to the cust.dbf table with the CustID of "SWFT", I still have "SWFT1" in the table. Go to the Job form… To utter dismay all seems to work as normal. Delete the record I just added, and pack. Go to a record in the Job form were the CustID is "SWFT1" hit edit, and Blam! Same darn error. Add the dummy "SWFT" record back into the Cust.dbf table and guess what… All seems to be fine again.
>>
>>So, if somebody has an explanation to my problem, I would surely enjoy your fix. But please try and make it sound technical so I don’t feel like a complete loser. J
>>

>My first feeling from your description is that their is something in the record other than the ID that is being tested for somewhere. My mistake is usually with an If ... else ... endif. The If ... gets run for almost every record but one of them (SWIFT1) executes the else ... and bombs on a typo.
>
>This is my guess
>Terry



Nice Try Terry, But I don't believe that one applies here. As this use to always work before. When just the other day one of my users told me they were getting this error. I tried it myself and sure enough, it would bomb. Why I wondered, all of a sudden like that. :)
Thanks
Jon
Non-MVP Non-MCP Non-MCSE

Visual FoxPro, What else is there?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform