Interesting. According to the help file that error means the PACK command was 
issued. Clearly that's not being done explicitly. 

It seems to be the long column name that causes the error. If I shorten the 
column name to "REALLY" it works.

--
rk
-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of MB Software 
Solutions, LLC
Sent: Thursday, July 11, 2013 4:48 PM
To: [email protected]
Subject: Re: Why can't I ALTER TABLE on a cursor?

On 7/11/2013 2:35 PM, Richard Kaye wrote:
> ACTIVATE SCREEN
> CLEAR
> CREATE CURSOR test (test1 c(10))
> DISPLAY STRUCTURE
> ALTER TABLE test ADD COLUMN test2 c(20)
> DISPLAY STRUCTURE
> ALTER TABLE test Alter COLUMN test1 n(8)
> DISPLAY STRUCTURE
> USE IN SELECT([test])

I thought so, but when I tried to apply it to my scenario, it failed. 
Try this stub below.  I get an error saying "Invalid operation for this 
cursor".

ACTIVATE SCREEN
CLEAR
CLEAR ALL
USE IN SELECT("testzz")
CREATE CURSOR testzz (ReallyLongNameField c(10))
DISPLAY STRUCTURE
ALTER TABLE testzz ADD COLUMN tmp1 c(20) && fails on this line
DISPLAY STRUCTURE
ALTER TABLE testzz drop COLUMN ReallyLongNameField
DISPLAY STRUCTURE
USE IN SELECT([testzz])

-- 
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
http://mbsoftwaresolutions.com
http://fabmate.com
http://twitter.com/mbabcock16

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD0442284263A80@ACKBWDDQH1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to