I am doning a select statemnet as follows: <table align="center" width="590" cellspacing="0" cellpadding="2"> <th align="left"> Data: </th> <th align="left"> Czas: </th> <sql:statement id="stmt4" conn="conn"> <sql:query> select RS_ID, RS_DESCRIPTION FROM REQUEST_STATUS where RS_ID = 'DUPA'; </sql:query> <sql:resultSet id="rset4"> <tr> <td><sql:getColumn colName="RS_ID"/></td> <td><sql:getColumn colName="RS_DESCRIPTION"/></td> </tr> </sql:resultSet> <tr align="center"> <td colspan="6"> <sql:wasEmpty>Niestety dupa.</sql:wasEmpty> <sql:wasNotEmpty>Tyle wierszy: <B><sql:rowCount/></B>.</sql:wasNotEmpty> </td> </tr> </sql:statement> Everything works perfect except one thing: If the select statement returns no rows it prints the sql statetment body in the output page (befor the table starts). (If there are some rows the sql statement body is not visible onthe output page) The same problem occurs in the dbtags-examples application downloaded from jackarta website. regards, lukasz
Here is an dbtags-example page (sql statement is shown on the page) Prove that an empty resultset executes the wasEmpty tag select id, name, description from test_books where id > 1000 No rows retrieved.
That's the same proble as bug 26863 (and it's fixed as well). I will attached a better test case and results and then mark this bug as duplicated.
Created attachment 10572 [details] Test case (based on examples and using hsqldb)
Created attachment 10573 [details] Buggy output
Created attachment 10574 [details] Right output after the fix
Fixed... *** This bug has been marked as a duplicate of 26863 ***