Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INSERT command
Message
 
To
17/05/2005 21:13:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01015160
Message ID:
01015778
Views:
18
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform