tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morgan Delagrange" <>
Subject Re: Problem with DBTags
Date Tue, 31 Jul 2001 04:27:03 GMT
The syntax of DBTags definitely does not support multiple queries per statement tag (i.e. your
pseudo-code example will not work.)

It's curious that using separate statement tags did not work however.  Could you send pseudo
code for that usage?

Lavandowska wrote on 7/29/01 4:05 pm:

>No, not the "where's the tld" 
>I'm trying to execute two 
>queries on the same 
>connection. The first query is 
>a simple "select name from 
>table where ..." that only 
>returns one column and one 
>row.  The second query 
>returns several columns for 
>several rows.  The problem is 
>that my driver returns 
>ption: java.sql.SQLException: 
>[TDS Driver]Invalid column 
>number (2). A number 
>between 1 and 1 is valid. 	at 
>It looks like something isn't 
>getting reset in 
>for the second query?  
>Perhaps it isn't creating a 
>new ResultSet?  Or could this 
>be an error in how 
>OrionServer caches tags?
>I've tried putting them in the 
>same <statement> tag, and 
>in seperate <statement> 
>tags, doesn't seem to 
>matter.  Either query on its 
>own runs fine, it is only when 
>I attempt to do both that I 
>get this problem. Example 
>psuedo-code follows:
><sql:statement id="stmt1" 
>    <sql:query>
>	select name from table 
>where id = <%= tableId %>
>    </sql:query>
>    <sql:resultSet id="rset1">
>	<sql:getColumn 
>    </sql:resultSet>
>   <sql:query>
>     select id, name, foo, bar
>     from table2
>     where table1_id = <%= 
>tableId %>
>     order by sort_order
>   </sql:query>
>   <%-- loop through the rows 
>of your query --%>
>   <table border="1">
>   <sql:resultSet id="rset2">
>       <tr><td>
>   	 <b>Name:</b> 
>       </td></tr>
>   </sql:resultSet>
>   </table>
>_____________________ Do You 
>Make international calls for 
>as low as $.04/minute with 
>Yahoo! Messenger 

View raw message