Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT command
Message
 
À
17/05/2005 21:13:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01015160
Message ID:
01015778
Vues:
20
>Dear all,
>
>I would like to insert a record with over 20 variables. The compiler always show an error message "Too many parameters". The syntax is ok and I try to minimize the variables into 10. It is ok!! Any limitation of the length of statement? How can I insert more than 20 variables within a SQL statement?
>
>Thanks a lot and feel free to contact me if you have any question.
>
>Best Regards,
>
>Justy

All works for me. Try this:
cTable  = "CREATE CURSOR cTest ("
cInsert = "INSERT INTO cTest ("
cValues = " VALUES ("
FOR asd = 1 TO 100
    cTable  = cTable  + IIF(asd==1,"",",") + "Field"+TRANSFORM(asd)+" C(10)"
    cInsert = cInsert + IIF(asd==1,"",",") + "Field"+TRANSFORM(asd)
    cValues = cValues + IIF(asd==1,"",",") + "Var"+TRANSFORM(asd)
    cVar    = "Var"+TRANSFORM(asd)
    &cvar   = TRANSFORM(asd)
NEXT
cTable  = cTable  + ")"
cInsert = cInsert + ")" + cValues +")"
MESSAGEBOX(cTable)
MESSAGEBOX(cInsert)
&cTable
&cInsert
BROW
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform