>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.