cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simone cecchini <>
Subject Re: esql and INSERT statement
Date Thu, 01 Feb 2001 08:56:08 GMT
thanks for your suggestion. i'll start working immediately.

At 03:10 2/1/01 -0500, you wrote:
>On Thu, 1 Feb 2001, simone cecchini wrote:
>> i am trying to use the esql taglib to insert some rows in a database
>> table. (am i using cocoon 1.8 with the included esql taglib and mysql
>> as a rdbms, with mm.mysql-2.0.2 drivers) i put the complete 'insert '
>> statement between the esql:query tags and specify a esql:error-results
>> content, to manage error conditions. this really inserts the row into
>> the database, but also produces - always - the error-results content.
>> the message reported (caught with the esql:get-message tag) is
>> 'ResultSet is from UPDATE. No Data' which is fairly correct, but which
>> is not [fired by] a real error. (btw tampering a little with the code
>> of the esql logicsheet, you can realize that the reason of such
>> behaviour is the call to the method '',
>> which is called in any case) this prevents me from distinguishing the
>> previously stated error from 'real ones' (those that lead to data not
>> being inserted), the latter meant to be output to the user. can
>> someone give me some suggestion to solve this problem? do i have to re
>> write part of the esql logicsheet (i would be pretty scared in doing
>> this ;-) ) or should i 'change my mind'?
>the method should not be called in your case. if you'll
>look at the source more carefully, you'll see that the esql class checks
>to see if the execute method returns true (a resultset) or false (an
>update count). if true, it invokes esql:results. if false, it invokes
>things for you to try:
>1. upgrade to latest cocoon from cvs. note that the esql schema changed
>significantly from 1.8 to 1.8.1. it is more or less finalized now.
>2. put debugging code in the esql logicsheet to try to see what's really
>3. make sure that the mysql jdbc driver is returning the correct results
>from the Statement.execute() method
>- donald
>Please check that your question has not already been answered in the
>FAQ before posting. <>
>To unsubscribe, e-mail: <>
>For additional commands, e-mail: <>

View raw message