[Zope] Arguments problem

Nick Garcia ngarcia@codeit.com
Thu, 29 Jul 1999 10:35:07 -0700


At 11:00 AM 7/29/99 -0600, Donald Holten wrote:
>	I have a ZSQL Method that takes 9 arguments.  Here is my call to the method:
>	<!--#call "add_users(Firstname, Lastname, Email, Institution, Telephone, 
>'1-20-77', Password, '1-30-77', Group)"-->
>	
>	And here is the method:
>	insert into Users values(<!--#sqlvar Firstname type=string-->,
>                         <!--#sqlvar Lastname type=string-->,
>                         <!--#sqlvar Email type=string-->,
>                         <!--#sqlvar Institution type=string-->,
>                         <!--#sqlvar Telephone type=string-->,
>                         <!--#sqlvar Lastvisit type=string-->,
>                         <!--#sqlvar Passwordvalue type=string-->,
>                         <!--#sqlvar Passworddate type=string-->,
>                         <!--#sqlvar Group type=string-->)
>                         
>	When I try calling the method, I get the following error:
>	Error Type: TypeError
>           Error Value: too many arguments; expected 4, got 10
>           
>        And the final lines of the Traceback is:
>        File 
>/usr/local/Zope-2.0.0a4-src/lib/python/DocumentTemplate/DT_Util.py, 
>line 315, in eval
>    (Object: add_users(Firstname, Lastname, Email, Institution, Telephone, 
>'1-20-77', Password, '1-30-77', Group))
>  File <string>, line 0, in ?
>TypeError: (see above)
>
>	I don't understand this.  Any ideas as to why it is occuring?
>	Donner
>

Your SQL statement is incomplete.  It should be insert into users (field1,
field2,...) values (value1, value2,...)

You're missing the list of fields to insert into.

Nick Garcia | ngarcia@codeit.com
CodeIt Computing | http://codeit.com