Re: [Zope] newbie question: parameter passing for ZSQL Object
>With , Zope gives me following error message: If the parameters are from another SQL statement, then the SQL method will not find them, since not the entire namespace is sent. Try: pvalueX can be also a variable. If your variables are called paramX, then the following will work: That is typical Python syntax. So in case you want to know why and how that works, read a little in the Python documentation (which is btw excellent.) Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Web2k - Web Design/Development & Technical Project Management ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] newbie question: parameter passing for ZSQL Object
It's pretty easy: There's a problem with your SQL-statement: >INSERT INTO plan >(field1, field2, field3, field4) >VALUES >(, , , ) It should be: INSERT INTO plan (field1, field2, field3, field4) VALUES (, , , ) Andyman ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question: parameter passing for ZSQL Object
In article <[EMAIL PROTECTED]>, zope <[EMAIL PROTECTED]> writes >My Z SQL method'insertItem' looks like > >Arguments: param1, param2, param3, param4 > >INSERT INTO plan >(field1, field2, field3, field4) >VALUES >(, , , ) Insert into plan ( field1, field2, field3 field4 ) values ( , , , ) -- Regards, Graham Chiu gchiucompkarori.co.nz http://www.compkarori.co.nz/index.php Powered by Interbase and Zope ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] newbie question: parameter passing for ZSQL Object
Hi. With some values that I got from a formular, I wan't to do some calculation stuff, and insert the calculated values into a database. My Z SQL method'insertItem' looks like Arguments: param1, param2, param3, param4 INSERT INTO plan (field1, field2, field3, field4) VALUES (, , , ) (parameters should be integer values) Can anybody tell me how I can call this method and pass parameters from my DTML method? With , Zope gives me following error message: Zope has encountered an error while publishing this resource. Error Type: Bad Request Error Value: ['param1', 'param2', 'param3', 'param4'] I was checking then "ZSQL Methods User's Guide" but, they don't give an example :-( Please help. Any idea? Thanks, Marc. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )