Well, I'm sorry to say that it does not work for me, I get:
file:///C:/xalan-j_2_7_0/samples/extensions/sql/pquery/dbtest.xsl; Line #41; Column #70; java.sql.SQLException: At least one parameter to the current statement is uninitialized.
file:///C:/xalan-j_2_7_0/samples/extensions/sql/pquery/dbtest.xsl; Line #51; Column #25; Error in Query
When fiddling around however it seems that there is something amiss in the use of:
Whenever I try to make a list, e.g. "int,string" (which would be a proper CSV list to my understanding) I get:
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Ytterligare otillåtna tecken: ',', 'string'
which is OK so I try to do an alternate pquery invocation:
, I get:
file:///C:/xalan-j_2_7_0/samples/extensions/sql/pquery/dbtest.xsl; Line #51; Column #25; Error in Query
When moving the type definitions into the Query structure (attribute "type") and removing the third parameter from the "sql:pquery" statement it works all the time regardless of the type values I enter (e.g. string instead of int).
All tests above done with the Derby database. I will try some more on z/OS DB2 after New Year.
So, till then: Happy Holidays.......
Lars
Från: Christoffer Bruun [mailto:cdbruun@flyingpigs.dk]
Skickat: den 20 december 2012 09:17
Till: j-users@xalan.apache.org
Ämne: Re: Sql extension - parameterized query
Hi,
I have no direct expericence with the Sql extension, but I think you should use
- otherwise it may assume that you want to add only 1 parameter (the 1 QUERY element) with a text value of SPI010000004016
Best regards
Christoffer Bruun
Den 20-12-2012 09:02, lars.bjerges@swedbank.se skrev:
...
What I would like to do is to have a xml fragment containing the parameter values:
SPI01
0000004016
And, in the stylesheet have the following code: