Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help Adding Column to Cursor
Message
De
04/12/2006 11:57:25
 
 
À
30/11/2006 00:04:21
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01173581
Message ID:
01174634
Vues:
10
>You guys have been very helpfull in the past. Thank you ahead of time for any responses.
>
>I am trying to add a column to a cursor created by the Afields command but I am getting the error message on the alter statement: Field name is a duplicate or invalid.
>
>Select invoiceitems
>ordnumfields = Afields(orditemfieldarray)
>Create Cursor orditemview From Array orditemfieldarray
>alter table orditemview add column toplevelitem c(20)
>
>-Randy

You can not alter the cursor's structure once it has been created. The easiest solution, as already stated here, is to add an item into the "orditemfieldarray"
Select invoiceitems
ordnumfields = AFIELDS(orditemfieldarray)

DIMENSION orditemfieldarray[ordnumfields+1, ALEN(orditemfieldarray, 2)]

orditemfieldarray[ordnumfields+1, 1] = 'toplevelitem'
orditemfieldarray[ordnumfields+1, 2] = 'C'
orditemfieldarray[ordnumfields+1, 3] = '20'
orditemfieldarray[ordnumfields+1, 4] = '0'
orditemfieldarray[ordnumfields+1, 5] = .F.

CREATE CURSOR orditemview FROM ARRAY orditemfieldarray
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform