DOC: Create SQL View Incorrectly DocumentedID: Q142242 3.00 3.00b WINDOWS kbprg kbdocerr The information in this article applies to:
SYMPTOMSA view created on a local table in the currently selected database container doesn't keep a reference to the database. The Table property of a cursor can be used to view this.
CAUSEThe Visual FoxPro 3.0 Help file and printed documentation for the CREATE SQL VIEW command incorrectly implies that you can properly create a view to a local table in the current database without specifying the database name in the SELECT statement. The documentation states that for tables in other databases, you must use the database name and table name separated by an exclamation mark (!). The correct method is for the database name to always be prepended to the table name. The database name is not automatically appended to the table name even when the table is in the currently selected database. Correct:
Incorrect:
The incorrect code will work but the view created with the incorrect syntax
may cause an error or unexpected results if you have multiple databases
containing the same table name. It can also cause a problem with the
Upsizing Wizard, which expects the correct syntax of dbc!table.
NOTE: Views created visually in the View Designer are created properly.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This documentation error has been fixed in Visual FoxPro 3.0b and 5.0 for Windows.
MORE INFORMATION
Steps to Reproduce ProblemThe following example highlights the fact that the database name isn't automatically picked up just because the table is in the current .dbc file. 1. Run the following code:
2. In the data designer, right-click, and then create and save a new local
3. In the Command window, type each of the following commands:
Additional reference words: docerr 3.00 3.00b VFoxWin 5.00
KBCategory: kbprg kbdocerr
KBSubcategory: FxotherDochelp
|
Last Reviewed: May 13, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |