Using FREE TABLES (not in a DBC), I have to drop 150 Columns and then add 110 Columns.
The code in processed each time the app is invoked. Sometime it works fine.
Occasionally, it comes back with the message:
Alias: CLDATA
Error number: 12
Error message: Variable 'Cash_1' not found
Line number of error: 303 [This is the first DROP COMMAND]
The message makes sense because the alias is incorrect.
What I can't understand is why the alias() is CLDATA, as it always encounters the SELECT MCDATA statement
Thanks,
Sam
The code in processed each time the app is invoked. Sometime it works fine.
Occasionally, it comes back with the message:
Alias: CLDATA
Error number: 12
Error message: Variable 'Cash_1' not found
Line number of error: 303 [This is the first DROP COMMAND]
The message makes sense because the alias is incorrect.
What I can't understand is why the alias() is CLDATA, as it always encounters the SELECT MCDATA statement
Code:
SELECT MCADTA
*-* Put field names in array.
AFIELDS(FieldNames) && Column 1 is the Field Name, Column 2 is the Field Type, Col 3 is the Field Width
IF ASCAN(FieldNames,'INVMBEG',-1,-1,1,1) = 0 && Not found
USE_TYPE = .T. && Files must be opened exclusively.
DO OPEN_FILES WITH USE_TYPE IN MDFILES
ALTER TABLE MCDATA DROP COLUMN CASH_1 {This is the line number of the error]
ALTER TABLE MCDATA DROP COLUMN MS_1
ALTER TABLE MCDATA DROP COLUMN AR_1
ALTER TABLE MCDATA DROP COLUMN INV_1
ALTER TABLE MCDATA DROP COLUMN OCA_1
ALTER TABLE MCDATA DROP COLUMN LAND_1
[indent] .[/indent]
[indent] .[/indent]
[indent] .[/indent]
[indent] ALTER TABLE MCDATA ADD COLUMN INVMBEG N(8) NULL && Next time, ASCAN() will find and processing will exit the "IF STATEMENT"[/indent]
ALTER TABLE MCDATA ADD COLUMN INVTBEG N(8) NULL
ALTER TABLE MCDATA ADD COLUMN INVMACQ N(8) NULL
Thanks,
Sam