PRB: Error When Running Gendbc.prgLast reviewed: April 5, 1996Article ID: Q149125 |
The information in this article applies to:
SYMPTOMSWhen you run Gendbc.prg, the following error is produced at line 722 in Visual FoxPro 3.0 and at line 834 in Visual FoxPro 3.0b:
cannot find object cust_id in the database CAUSEThis error occurs when a database contains two views where the name of the second view matches the first part of the name of the first view. An example is a database that has a view called myview1 and a second view called myview.
WORKAROUNDTo prevent this problem, alter the Gendbc.prg program file, or change the setting of EXACT. For example, type the following command in the command window:
SET EXACT ONOr type the following command in the command window:
MODIFY Gendbc.prg.In version 3.0, the offending line is 711, and in version 3.0b this line is 823. The line reads:
LOCATE FOR UPPER(GenViewCursor.ObjectName ) = cViewName AND ; GenViewCursor.Objecttype = 'View'Change this line to read:
LOCATE FOR ALLTRIM(UPPER( GenViewCursor.ObjectName )) == cViewName AND ; GenViewCursor.Objecttype = 'View'This change includes the ALLTRIM function to remove all trailing spaces and changes the equals to double equals to ensure that an 'Exactly Like' match is used. The first time GENDBC is run after the change, it will automatically recompile and run correctly.
STATUSMicrosoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional reference words: 3.00 3.00b VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |