PRB: Aliased Field Not Saved in Query Designer (138661)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q138661 SYMPTOMS
If the AS clause is used to rename a field in the Query or View designer,
it will be lost when the Query or View is reopened. As long as the Query or
View is created and saved, the AS clause remains and works correctly. If
the Query or View is modified, then the AS clause will disappear.
WORKAROUND
A query can be created with FoxPro's SELECT - SQL statement. The following
example will create a query.
SELECT <tablename.fieldname> AS custom_name FROM ;
<tablename> INTO CURSOR queryname
A view can be created with FoxPro's CREATE SQL VIEW statement. The
following example will create a local view.
CREATE SQL VIEW mysqlview AS SELECT <tablename.fieldname> AS ;
custom_name FROM <database container.tablename>
Instead of opening the Query or View designer and losing the AS clause, the
code can be changed in a .prg file.
STATUS
Microsoft is researching this behavior and will post new information here
in the Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 2/10/2000 |
---|
Keywords: | KB138661 |
---|
|