I have a problem!!! When I make a ZSQL method with an insert, i have the fallowing error: "This was not a query" My ZSQL method is the following: GENERE, UFFICIO ARGUMENTS: ZSQL method INSERT ITNO WS (GENERE, UFFICIO) (<dtml-sqlvar GENERE type=string>, <dtml-sqlvar UFFICIO type=string> ) Thank you ALessandra
Alessandra Pessolano wrote:
I have a problem!!! When I make a ZSQL method with an insert, i have the fallowing error: "This was not a query" My ZSQL method is the following: GENERE, UFFICIO ARGUMENTS: ZSQL method INSERT ITNO WS (GENERE, UFFICIO) (<dtml-sqlvar GENERE type=string>, <dtml-sqlvar UFFICIO type=string> )
Ok, two things. First, I believe the query in wrong, it should be something like: insert into ws (genere, ufficio), values ( etc. ^^^^^^ Assuming you have only mistyped the query, there is no problem. Zope is simply complaining that the query do not return any result (not an empty result, no result at all). However, the query should work with no problem. Regards Paolo -- Paolo Bizzarri - Responsabile Marketing I3 Icube Srl Sede: Via Ridolfi 15 - 56124 Pisa (PI), Italia E-mail: p.bizzarri@icube.it WWW: www.icube.it Tel: (+39) 050 97 02 07 Fax: (+39) 050 31 36 588
That is fine. It was not a query. Now do a query and see if the data was there. J
From: "Alessandra Pessolano" <Alessandra_Pessolano@gidi.it> Date: Mon, 3 Apr 2000 16:04:54 +0100 To: zope@zope.org Subject: [Zope] ZSQL method
I have a problem!!! When I make a ZSQL method with an insert, i have the fallowing error: "This was not a query" My ZSQL method is the following: GENERE, UFFICIO ARGUMENTS: ZSQL method INSERT ITNO WS (GENERE, UFFICIO) (<dtml-sqlvar GENERE type=string>, <dtml-sqlvar UFFICIO type=string> )
Thank you ALessandra
_______________________________________________ Zope maillist - Zope@zope.org 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 )
You're probably getting this if you test the method. There's nothing wrong with this, it's the correct response! It just means that the execution of the SQL returned no data, which is what you'd expect for an insert :-) Chris Alessandra Pessolano wrote:
I have a problem!!! When I make a ZSQL method with an insert, i have the fallowing error: "This was not a query" My ZSQL method is the following: GENERE, UFFICIO ARGUMENTS: ZSQL method INSERT ITNO WS (GENERE, UFFICIO) (<dtml-sqlvar GENERE type=string>, <dtml-sqlvar UFFICIO type=string> )
Thank you ALessandra
_______________________________________________ Zope maillist - Zope@zope.org 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 )
Hi Alessandra, Alessandra Pessolano wrote:
I have a problem!!! When I make a ZSQL method with an insert, i have the fallowing error: "This was not a query" My ZSQL method is the following: GENERE, UFFICIO ARGUMENTS: ZSQL method INSERT ITNO WS (GENERE, UFFICIO) (<dtml-sqlvar GENERE type=string>, <dtml-sqlvar UFFICIO type=string> )
Thank you ALessandra
No, its not an error. Only a status message :-) It was a statement - not a query. Meaning there is nothing returned by the expression what it perfectly alright. You can use it any time in your dtml-documents or -methods with <dtml-call "your_zsql_method(GENERE=genere,UFFICIO=ufficio)"> Best regards Tino Wildenhain
participants (5)
-
Alessandra Pessolano -
Chris Withers -
J. Atwood -
Paolo bizzarri -
Tino Wildenhain