Re: esql:query problem
On 26.Jun.2003 -- 10:04 AM, Dmitry Diskin wrote: Hello I noticed that if I insert any tag between closing /esql:query and opening esql:results - nothing works. Is it a known situation and documented somewhere? Example below doesn't work: esql:connection esql:poolmypool/esql:pool esql:execute-query esql:query select * from something /esql:query tmp esql:results esql:row-results recordsome data here/record /esql:row-results /esql:results /tmp /esql:execute-query /esql:connection If I remove tmp/tmp tags - it works! I guess it is not documented -- please feel free to add to wiki.cocoondev.org Even if it were allowed (that is the xpath expressions would use descendant instead of child), the tag would just be swallowed. If you need to enclose your result with tmp/, place it behind the esql:results tag or in front of the esql:execute-query tag. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: esql:query problem
On 24.Jun.2003 -- 08:48 AM, Tim Bachta wrote: Here is what I am trying, I am getting an invalid parameter bindings error, do I need to register the out parameters? Yes -- unless your driver returns a result set. This is highly dependent on the jdbc driver :-( If you know how to do it in plain java, we'll be able to help you transfer this knowledge to esql. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: esql:query problem
Here is my code in plain Java: import java.util.*; import java.sql.*; import javax.sql.*; import javax.naming.*; import java.text.*; import com.microsoft.jdbc.sqlserver.SQLServerDriver; public class Test { public static void main(String args[]) { boolean retVal = false; try { Connection con = makeConnection(); if (con != null) { try { CallableStatement stmt = con.prepareCall({call rptLocationDeviations(?,?,?,?)}); stmt.setInt(1, 199); stmt.setString(2, Rm 130 B); stmt.setString(3, 5-20-2003); stmt.setString(4, 6-20-2003); ResultSet res = stmt.executeQuery(); while (res.next()) { System.out.println(Result set is working); } res.close(); stmt.close(); retVal = true; } catch (SQLException ex) { ex.printStackTrace(); } finally { try { con.close(); } catch (SQLException ex) { ex.printStackTrace(); } } } else { System.out.println(noConnection); } } catch(SQLException sql) { sql.printStackTrace(); } System.out.println(Return val =+ retVal); } public static Connection makeConnection() throws SQLException { System.setProperty(jdbc.drivers, com.microsoft.jdbc.sqlserver.SQLServerDriver); return DriverManager.getConnection(jdbc:microsoft:sqlserver://kopentpdc:1433;D atabaseName=vyzo, user, password); } } End Java /// Here is what I have in my xsp: esql:execute-query esql:call{call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:call-results esql:use-results esql:result xsp:expr(ResultSet)esql:get-object column=1 from-call=true/ /xsp:expr /esql:result esql:results esql:row-results test esql:get-string column=1/ /test /esql:row-results /esql:results /esql:use-results /esql:call-results /esql:execute-query // End XSP / This procedure should return a result set. And it does in my Java version. I have looked at the Java code that cocoon compiles from my xsp and everything looks fine there, granted it is a little confusing to look through since the formatting is not the greatest. Thanks for the help. Tim Bachta -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 7:37 AM To: [EMAIL PROTECTED] Subject: Re: esql:query problem On 24.Jun.2003 -- 08:48 AM, Tim Bachta wrote: Here is what I am trying, I am getting an invalid parameter bindings error, do I need to register the out parameters? Yes -- unless your driver returns a result set. This is highly dependent on the jdbc driver :-( If you know how to do it in plain java, we'll be able to help you transfer this knowledge to esql. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: esql:query problem
Forgot to add that I am getting an invalid parameter bindings error from cocoon. Tim Bachta (913)693-0538 Office (913)486-5213 Mobile -Original Message- From: Tim Bachta Sent: Wednesday, June 25, 2003 9:53 AM To: [EMAIL PROTECTED] Subject: RE: esql:query problem Here is my code in plain Java: import java.util.*; import java.sql.*; import javax.sql.*; import javax.naming.*; import java.text.*; import com.microsoft.jdbc.sqlserver.SQLServerDriver; public class Test { public static void main(String args[]) { boolean retVal = false; try { Connection con = makeConnection(); if (con != null) { try { CallableStatement stmt = con.prepareCall({call rptLocationDeviations(?,?,?,?)}); stmt.setInt(1, 199); stmt.setString(2, Rm 130 B); stmt.setString(3, 5-20-2003); stmt.setString(4, 6-20-2003); ResultSet res = stmt.executeQuery(); while (res.next()) { System.out.println(Result set is working); } res.close(); stmt.close(); retVal = true; } catch (SQLException ex) { ex.printStackTrace(); } finally { try { con.close(); } catch (SQLException ex) { ex.printStackTrace(); } } } else { System.out.println(noConnection); } } catch(SQLException sql) { sql.printStackTrace(); } System.out.println(Return val =+ retVal); } public static Connection makeConnection() throws SQLException { System.setProperty(jdbc.drivers, com.microsoft.jdbc.sqlserver.SQLServerDriver); return DriverManager.getConnection(jdbc:microsoft:sqlserver://kopentpdc:1433;D atabaseName=vyzo, user, password); } } End Java /// Here is what I have in my xsp: esql:execute-query esql:call{call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:call-results esql:use-results esql:result xsp:expr(ResultSet)esql:get-object column=1 from-call=true/ /xsp:expr /esql:result esql:results esql:row-results test esql:get-string column=1/ /test /esql:row-results /esql:results /esql:use-results /esql:call-results /esql:execute-query // End XSP / This procedure should return a result set. And it does in my Java version. I have looked at the Java code that cocoon compiles from my xsp and everything looks fine there, granted it is a little confusing to look through since the formatting is not the greatest. Thanks for the help. Tim Bachta -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 7:37 AM To: [EMAIL PROTECTED] Subject: Re: esql:query problem On 24.Jun.2003 -- 08:48 AM, Tim Bachta wrote: Here is what I am trying, I am getting an invalid parameter bindings error, do I need to register the out parameters? Yes -- unless your driver returns a result set. This is highly dependent on the jdbc driver :-( If you know how to do it in plain java, we'll be able to help you transfer this knowledge to esql. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: esql:query problem
Guessing a little; should it be little case int instead of Int at esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter -Roger - Original Message - From: Tim Bachta [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:53 AM Subject: RE: esql:query problem Here is my code in plain Java: import java.util.*; import java.sql.*; import javax.sql.*; import javax.naming.*; import java.text.*; import com.microsoft.jdbc.sqlserver.SQLServerDriver; public class Test { public static void main(String args[]) { boolean retVal = false; try { Connection con = makeConnection(); if (con != null) { try { CallableStatement stmt = con.prepareCall({call rptLocationDeviations(?,?,?,?)}); stmt.setInt(1, 199); stmt.setString(2, Rm 130 B); stmt.setString(3, 5-20-2003); stmt.setString(4, 6-20-2003); ResultSet res = stmt.executeQuery(); while (res.next()) { System.out.println(Result set is working); } res.close(); stmt.close(); retVal = true; } catch (SQLException ex) { ex.printStackTrace(); } finally { try { con.close(); } catch (SQLException ex) { ex.printStackTrace(); } } } else { System.out.println(noConnection); } } catch(SQLException sql) { sql.printStackTrace(); } System.out.println(Return val =+ retVal); } public static Connection makeConnection() throws SQLException { System.setProperty(jdbc.drivers, com.microsoft.jdbc.sqlserver.SQLServerDriver); return DriverManager.getConnection(jdbc:microsoft:sqlserver://kopentpdc:1433;D atabaseName=vyzo, user, password); } } End Java /// Here is what I have in my xsp: esql:execute-query esql:call{call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:call-results esql:use-results esql:result xsp:expr(ResultSet)esql:get-object column=1 from-call=true/ /xsp:expr /esql:result esql:results esql:row-results test esql:get-string column=1/ /test /esql:row-results /esql:results /esql:use-results /esql:call-results /esql:execute-query // End XSP / This procedure should return a result set. And it does in my Java version. I have looked at the Java code that cocoon compiles from my xsp and everything looks fine there, granted it is a little confusing to look through since the formatting is not the greatest. Thanks for the help. Tim Bachta -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 7:37 AM To: [EMAIL PROTECTED] Subject: Re: esql:query problem On 24.Jun.2003 -- 08:48 AM, Tim Bachta wrote: Here is what I am trying, I am getting an invalid parameter bindings error, do I need to register the out parameters? Yes -- unless your driver returns a result set. This is highly dependent on the jdbc driver :-( If you know how to do it in plain java, we'll be able to help you transfer this knowledge to esql. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: esql:query problem
I thought the same but that did not work. The Int declares the types so if you look in the java code it is transformed into _esql_query.getCallableStatement().setInt(1,(number)); Tim Bachta (913)693-0538 Office (913)486-5213 Mobile -Original Message- From: Roger I Martin PhD [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:11 AM To: [EMAIL PROTECTED] Subject: Re: esql:query problem Guessing a little; should it be little case int instead of Int at esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter -Roger - Original Message - From: Tim Bachta [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:53 AM Subject: RE: esql:query problem Here is my code in plain Java: import java.util.*; import java.sql.*; import javax.sql.*; import javax.naming.*; import java.text.*; import com.microsoft.jdbc.sqlserver.SQLServerDriver; public class Test { public static void main(String args[]) { boolean retVal = false; try { Connection con = makeConnection(); if (con != null) { try { CallableStatement stmt = con.prepareCall({call rptLocationDeviations(?,?,?,?)}); stmt.setInt(1, 199); stmt.setString(2, Rm 130 B); stmt.setString(3, 5-20-2003); stmt.setString(4, 6-20-2003); ResultSet res = stmt.executeQuery(); while (res.next()) { System.out.println(Result set is working); } res.close(); stmt.close(); retVal = true; } catch (SQLException ex) { ex.printStackTrace(); } finally { try { con.close(); } catch (SQLException ex) { ex.printStackTrace(); } } } else { System.out.println(noConnection); } } catch(SQLException sql) { sql.printStackTrace(); } System.out.println(Return val =+ retVal); } public static Connection makeConnection() throws SQLException { System.setProperty(jdbc.drivers, com.microsoft.jdbc.sqlserver.SQLServerDriver); return DriverManager.getConnection(jdbc:microsoft:sqlserver://kopentpdc:1433;D atabaseName=vyzo, user, password); } } End Java /// Here is what I have in my xsp: esql:execute-query esql:call{call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:call-results esql:use-results esql:result xsp:expr(ResultSet)esql:get-object column=1 from-call=true/ /xsp:expr /esql:result esql:results esql:row-results test esql:get-string column=1/ /test /esql:row-results /esql:results /esql:use-results /esql:call-results /esql:execute-query // End XSP / This procedure should return a result set. And it does in my Java version. I have looked at the Java code that cocoon compiles from my xsp and everything looks fine there, granted it is a little confusing to look through since the formatting is not the greatest. Thanks for the help. Tim Bachta -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 7:37 AM To: [EMAIL PROTECTED] Subject: Re: esql:query problem On 24.Jun.2003 -- 08:48 AM, Tim Bachta wrote: Here is what I am trying, I am getting an invalid parameter bindings error, do I need to register the out parameters? Yes -- unless your driver returns a result set. This is highly dependent on the jdbc driver :-( If you know how to do it in plain java, we'll be able to help you transfer this knowledge to esql. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL
Re: esql:query problem
On 25.Jun.2003 -- 09:53 AM, Tim Bachta wrote: Here is my code in plain Java: snip/ CallableStatement stmt = con.prepareCall({call rptLocationDeviations(?,?,?,?)}); stmt.setInt(1, 199); stmt.setString(2, Rm 130 B); stmt.setString(3, 5-20-2003); stmt.setString(4, 6-20-2003); ResultSet res = stmt.executeQuery(); while (res.next()) { System.out.println(Result set is working); } snip/ Mmmh, this looks very simple. You have no out parameters and you get a result set back. Here is what I have in my xsp: esql:execute-query esql:call{call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:call-results esql:use-results esql:result xsp:expr(ResultSet)esql:get-object column=1 from-call=true/ /xsp:expr /esql:result You should not need the esql:use-results/ tag. Try removing the tag and report back. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: esql:query problem
My code now looks like this w/out the user-results tag: esql:execute-query esql:call{call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:call-results esql:resultxsp:expr(ResultSet)esql:get-object column=1 from-call=true//xsp:expr/esql:result esql:results esql:row-results testesql:get-string column=1//test /esql:row-results /esql:results /esql:call-results /esql:execute-query and I get back a different error message now: org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): org.apache.avalon.framework.CascadingRuntimeException: Error getting ascii data for column 1 We may be getting closer? Thanks for all the help. Tim Bachta -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:20 AM To: [EMAIL PROTECTED] Subject: Re: esql:query problem On 25.Jun.2003 -- 09:53 AM, Tim Bachta wrote: Here is my code in plain Java: snip/ CallableStatement stmt = con.prepareCall({call rptLocationDeviations(?,?,?,?)}); stmt.setInt(1, 199); stmt.setString(2, Rm 130 B); stmt.setString(3, 5-20-2003); stmt.setString(4, 6-20-2003); ResultSet res = stmt.executeQuery(); while (res.next()) { System.out.println(Result set is working); } snip/ Mmmh, this looks very simple. You have no out parameters and you get a result set back. Here is what I have in my xsp: esql:execute-query esql:call{call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:call-results esql:use-results esql:result xsp:expr(ResultSet)esql:get-object column=1 from-call=true/ /xsp:expr /esql:result You should not need the esql:use-results/ tag. Try removing the tag and report back. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: esql:query problem
Well I tried that and no error, the only problem is I get no results either. I was looking at the example that I am working from http://cocoon.apache.org/2.1/userdocs/xsp/esql.html#Stored+Procedure+Sup port And it uses the call-results tag as well as the use-results tag. I guess this may be bad documentation? I don't know I just wish I could get this to work. Thanks again for the help it is really appreciated. Tim Bachta -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:38 AM To: [EMAIL PROTECTED] Subject: Re: esql:query problem On 25.Jun.2003 -- 10:32 AM, Tim Bachta wrote: My code now looks like this w/out the user-results tag: esql:execute-query esql:call{call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:call-results esql:resultxsp:expr(ResultSet)esql:get-object column=1 from-call=true//xsp:expr/esql:result Sorry, I should have been more verbose, try: esql:execute-query esql:call{call rptLocationDeviations( esql:parameter direction=intype=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)}/esql:call esql:results esql:row-results testesql:get-string column=1//test /esql:row-results /esql:results /esql:execute-query (In addition, call-results does not apply when a result set is returned) Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: esql:query problem
On 25.Jun.2003 -- 10:48 AM, Tim Bachta wrote: Well I tried that and no error, the only problem is I get no results either. I was looking at the example that I am working from Maybe you need to add the needs-query attribute. Some drivers don't like it if a CallableStatement is just execute()'ed and your java code uses executeQuery(). So, try esql:execute-query esql:call needs-query=true{call rptLocationDeviations( esql:parameter direction=intype=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)} /esql:call esql:results esql:row-results testesql:get-string column=1//test /esql:row-results /esql:results /esql:execute-query http://cocoon.apache.org/2.1/userdocs/xsp/esql.html#Stored+Procedure+Sup port And it uses the call-results tag as well as the use-results tag. I guess this may be bad documentation? I don't know I just wish I could get this to work. Thanks again for the help it is really appreciated. This topic is difficult because each and every driver bahaves differently in this respect. But documentation is indeed slim. Please feel free to add to http://wiki.cocoondev.org Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: esql:query problem
Chris, That was it, thank you for the help. All of you that helped thank you. Tim Bachta -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:56 AM To: [EMAIL PROTECTED] Subject: Re: esql:query problem On 25.Jun.2003 -- 10:48 AM, Tim Bachta wrote: Well I tried that and no error, the only problem is I get no results either. I was looking at the example that I am working from Maybe you need to add the needs-query attribute. Some drivers don't like it if a CallableStatement is just execute()'ed and your java code uses executeQuery(). So, try esql:execute-query esql:call needs-query=true{call rptLocationDeviations( esql:parameter direction=intype=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprroom/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprbeginTime/xsp:expr/esql:parameter, esql:parameter direction=in type=Stringxsp:exprendTime/xsp:expr/esql:parameter)} /esql:call esql:results esql:row-results testesql:get-string column=1//test /esql:row-results /esql:results /esql:execute-query http://cocoon.apache.org/2.1/userdocs/xsp/esql.html#Stored+Procedure+Sup port And it uses the call-results tag as well as the use-results tag. I guess this may be bad documentation? I don't know I just wish I could get this to work. Thanks again for the help it is really appreciated. This topic is difficult because each and every driver bahaves differently in this respect. But documentation is indeed slim. Please feel free to add to http://wiki.cocoondev.org Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: esql:query problem
Here is what I am trying, I am getting an invalid parameter bindings error, do I need to register the out parameters? esql:execute-query esql:call {? = call rptLocationDeviations(esql:parameter direction=in type=Intxsp:exprnumber/xsp:expr/esql:parameter, esql:parameter direction=in type=String xsp:exprroom/xsp:expr/esql:parameter,esql:parameter direction=in type=String xsp:exprbeginTime/xsp:expr /esql:parameter,esql:parameter direction=in type=String xsp:exprendTime/xsp:expr/esql:parameter)} /esql:call esql:call-results esql:use-results esql:resultxsp:expresql:get-object column=1 from-call=true//xsp:expr/esql:result esql:results esql:row-results test esql:get-string column=1/ /test /esql:row-results /esql:results /esql:use-results /esql:call-results /esql:execute-query Tim Bachta (913)693-0538 Office (913)486-5213 Mobile -Original Message- From: Michael Raffenberg [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 7:25 PM To: [EMAIL PROTECTED] Subject: AW: esql:query problem Hi Tim, did you try the esql:call Tag? Here you find a introduction: http://cocoon.apache.org/2.1/userdocs/xsp/esql.html#Stored+Procedure+Sup port --Raffy -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Montag, 23. Juni 2003 22:55 An: [EMAIL PROTECTED] Betreff: esql:query problem I am attempting to call a stored procedure using esql:query. Other stored procedures work using this so it is not a connection issue. I have narrowed down the issue to being the procedure itself. I am selecting data and inserting it into a temp table then selecting more data and joining the two data sets. I need to use the temp tables there is no way around it. The problem is the stored procedure will not return a result set in cocoon because it sees the insert statement then stops thinking there is not a result set. My code from my xsp is below, if anyone has any information about why this does not work it would be greatly appreciated. Thank you Tim Bachta esql:execute-query esql:query execute a_joe 'xsp:exprroom/xsp:expr','xsp:exprbeginTime/xsp:expr',' xsp:expr endTime/xsp:expr' /esql:query esql:results task-dates esql:row-results task-date date esql:get-string column=1/ /date /task-date /esql:row-results /task-dates /esql:results /esql:execute-query - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]