Hi; i have the following xsp to perform an insert into a table
<xsp:include>java.sql</xsp:include>
<xsp:logic>
java.util.Date now=new java.util.Date();
</xsp:logic>
<esql:connection>
<esql:pool>mcnavigator</esql:pool>
<esql:execute-query>
<esql:query>Insert into comments (Comment_ID, User_ID, Comment_text, Commented_URL, Comment_Date, Comment_browser) values (
'<xsp-session-fw:getxml context="authentication" path="/authentication/ID"/>',
'<xsp-request:get-parameter name="comment_text"/>',
'<xsp-request:get-parameter name="link"/>',
'<xsp:expr>new java.sql.Timestamp(now.getTime())</xsp:expr>',
'<xsp-request:get-header name="user-agent"/>');
</esql:query>
</esql:execute-query>
</esql:connection>
When i execute it, i get a Unhandled exception type SQLException, but if I simply copy the query into mysql it runs;
Is there something wrong?
Best Regards, Davide
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
this is the detailed error:
org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling add_to_db_xsp: ERROR 1 (org\apache\cocoon\www\mcnavigator\xsp\add_to_db_xsp.java): ... if (_esql_query != null) { _esql_queries.push(_esql_query); } // start error (lines 328-328) "Unhandled exception type SQLException" _esql_query = _esql_connection.createQuery( // end error String.valueOf(""), String.valueOf( "" ... Line 328, column 0: Unhandled exception type SQLException
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
