Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alter Table - Drop [Invalid Subscript Reference] error
Message
 
To
14/08/2006 16:10:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01145415
Message ID:
01145432
Views:
24
>>What is exactly the line on which you have the error?
>>
>>>Hi All,
>>> I seem to be getting a 'brain cramp' today. < g >
>>>
>>>I have the following code in my program. lnFound is greater then 0 and I can see the field in the table, and in the array, but I get the above message [] when I run the program.
>>>
>>>  lnFound = ASCAN(aFieldArray, "CONTRACT")
>>>  IF lnFound > 0
>>>    ALTER TABLE 'service' ;
>>>      DROP COLUMN 'CONTRACT'   && error line here
>>>  ENDIF  &&  IF lnfound > 0
>>>
>>>
>>>Any Ideas?
>>>
>>>TIA
>>>Beth
>
>sorry, the Alter table is the line that the error happens.

Are you sure that aFieldArray(lnFound)=="CONTRACT" ?

What if you use the plain one line:
 ALTER TABLE service DROP COLUMN CONTRACT
Previous
Reply
Map
View

Click here to load this message in the networking platform