You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Mader, Steve" <st...@eds.com> on 2001/10/23 22:00:12 UTC

RE: DBTags Tag library

I'm having the same issue and I'm also trying to find some common thread as
to why this happens. 

-----Original Message-----
From: alex [mailto:alex@soft-expert.com]
Sent: Sunday, September 23, 2001 7:55 AM
To: taglibs-user@jakarta.apache.org
Subject: DBTags Tag library 


Hi,
There is a small problem I saw when using DBTags library with JRun engine
and IIS 5.0 and ODBC database access.
What is happening: when I use a SELECT which does not return anything, so
it's unsuccesful, the generated webpage contains also the SELECT statement
into it ! 
Here is a piece of the code:
 
<sql:statement id="stmt1" conn="conn1"> 
  <sql:query>
    SELECT Info_id, Details FROM Informative
 WHERE Type = 1
  </sql:query>
  <sql:resultSet id="rset1" >
      <LI>
    <sql:getColumn position="2"/><BR>
  <%String id =  rset1.getString(1);%>
   </LI>
  </sql:resultSet>
</sql:statement>

When there are no results, I get a string:
    SELECT Info_id, Details FROM Informative
 WHERE Type = 1

Not very pretty, isn't it ? 
I believe, but I may speak foolish things, that the context's output buffer
is flushed only inside a block where some results are obtained so the case
when no results are returned isn't considered.
 
A last thing: I used wasEmpty AND/OR wasNotEmpty with no results in solving
the problem. I also observer that is not happening 100% ! Sometimes, somehow
I managed to avoid this situation. (??)
 
I do not expect help on this matter ; maybe only a confirmation that this
happens elswere.
 
For Marius Scurtescu :
Da-i inainte ca faci o treaba buna ! Ma bucur sa vad nume d'ale noastre pe
aici.
 
Regards,
Alex