Normand,
First you need to check if you have fields longer than 10 characters. ALTER TABLE command doesn't work on cursors with fields longer than 10 characters since it needs to create a physical free table first.
>Hi,
>
>I had a piece of code where I was simply creating a cursor from an array. Then, I used Alter Table. It used to work very well. Now, I made some changes to the original table. I get the error 1115 (Invalid operation on the cursor) on every alter table line that I have. That error states that VFP is trying to do a PACK and cannot do it.
>
>My field names are unique (not already in the table) and are not too long. Also, the cursor is normally created without any problem
>
>I can't find what can be wrong all of a sudden.
>
>Thank you for you help!
>
>Normand Savage
>ICX Informatique
>
>
>SELECT prospect
>
>AFIELDS(aTemp,"PROSPECT")
>
>CREATE CURSOR curRapport2 FROM ARRAY aTemp
>ALTER table curRapport2 alter COLUMN nofiche I
>ALTER table curRapport2 ADD COLUMN nomMarche C(25)
>ALTER table curRapport2 ADD COLUMN nomProprio C(35)
>
If it's not broken, fix it until it is.
My Blog