xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoffer Bruun <cdbr...@flyingpigs.dk>
Subject Re: Sql extension - parameterized query
Date Thu, 20 Dec 2012 12:49:19 GMT

Den 20-12-2012 13:47, lars.bjerges@swedbank.se skrev:
>
> 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:
>
> <!-- Build a CSV list of parameter types -->
>
> <xsl:param name="q1type" select="int" />
>
That won't work since select will try to evaluate int as an xpath query
You should use:
<xsl:param name="q1type">int</xsl:param>

> 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:
>
> <xsl:variable name="table" select="sql:pquery($db, $q1, 
> 'int,string')"/> , I get:
>


Mime
View raw message