Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help Adding Column to Cursor
Message
De
04/12/2006 12:17:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
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:
01174643
Vues:
12
>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

Randy,
IMHO creating a cursor from afields() result is never a good idea unless you process the array before creating the cursor (if you do not, you should be aware of other elements in afields() generated array such as triggers).
Error is due to LFNs. If you know the field(s) you want to add beforehand then this is easier and doesn't cause and error:
select *, space(20) as toplevelitem from invoiceItems where .f. into cursor ordItemView readwrite
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform