Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using AS to rename a field

Status
Not open for further replies.

polo022

Programmer
Mar 14, 2006
15
LU
Hello,
Me again...

I have a problem using AS to rename a field.
Here is the source code :
TABLE FILE MYFILE
PRINT MYFIELD AS 'NEWNAME'
ON TABLE HOLD AS HOLD1
END

TABLE FILE HOLD1
PRINT NEWNAME
END

This works when I run it from the editor or from the saved procedure but it does not work when run from ReportCaster.
The error messsgae is INF32073.

Thank you
 
Hello,
I already tried it and even with ASNAMES=ON ReportCaster does the same error. But it works if run from the editor. :-/
 
After you issue the HOLD AS HOLD1 and END, can you issue the following:

?FF HOLD1

This will show what fields are found in the HOLD file called HOLD1. You may find that there's another HOLD1.MAS somewhere. To find where it is, issue:

WHENCE HOLD1 MASTER

and it'll tell you where the HOLD1 Master file is found.
 
Hello

?FF HOLD1 run from the editor returned "NEWNAME" (renamed field).
?FF HOLD1 run from ReportCaster returned "MYFIELD" (original field).

WHENCE HOLD1 MASTER returned the file path but Icannot find the file HOLD1.MAS because it was already deleted I think.

 
OK, problem solved.

I have done a big mistake. Instead of typing "SET ASNAMES=ON" I typed "-SET ASNAMES=ON".

Thank you for your help, sorry for the mistake
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top