Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a table, fieldnames in a list
Message
De
29/06/2012 08:51:30
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
27/06/2012 16:31:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 7
Database:
Visual FoxPro
Divers
Thread ID:
01547094
Message ID:
01547211
Vues:
36
>Ok, apparently I have teh dumb today
>
>I'm trying to create a table structure in a program by building a list and then issuing the command
>Create table Table1 &FieldList
>
>and I keep getting a 'syntax error'.
>
>I'm building based of off values in a particular table column
>
>
>mflist = "'" + '(SCN C(7),'
>i = 1
>do while i <> 100
>  i = i + 1
>  if empty(idno)
>    skip
>    loop
>  endif
>  if i = 100
>    mflist = mflist + 'F' + alltrim(idno) + ' c(1))' + "'"
>  else
>    mflist = mflist + 'F' + alltrim(idno) + ' c(1), '
>  endif
>  skip
>enddo
>sele 0
>create table Table1 &mflist
>
>
>I'm putting an 'F' in front of the 'idno' fields because the value is a number (character)

Are you sure that it contains a proper number in each record? Browse fields idno, x=val(idno), and see if it shows any zeros in the x column.

If you can't find it that way, suspend on error, _cliptext=mflist, and try to paste it in a little prg. Also try to add a semicolon and a carriage return before or after each comma, so to spot the offender more easily.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform