[Zope] error in addZSQLMethod.

J Cameron Cooper jccooper@jcameroncooper.com
Mon, 31 Mar 2003 18:10:30 -0600


>
>
>I am trying to add zsql method using python script.I have written the
>following.
>
>context.manage_addZSQLMethod('selectname', title='selectname',
>connection_id='Oracle_database_connection', arguments='PROF_ID,firstname,middlename,lastname,email,linktowebpage,degree,officenumber,telephonenumber',
>template='Select firstname from Professor')
>
>The error that i get is an attribute error.Can someone tell me how to
>fix it.
>
It's easier to diagnose an error message if we can actually see it, but 
I think I can do it blind: the contents of 'arguments' should be 
separated by spaces or newlines, and not by commas, as the online help 
for ZSQL Methods will tell you.

>Also if anyone has come across a tutorial on using zope API
>where u can add new products using python,please send me the URL.
>  
>
Well, I think you got it above. There's really not much more to it: find 
the method, use the method as documented (or if not documented, guess.) 
If you like, you can go take a look at the Zope Cookbook at zopelabs.com 
where there may be something on this. Going through the list archives 
will also tell you more than you want to know on the subject.