Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DBTag print/renders sql query statement

Joe Rogers
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to use DBTag and have run into an issue when no records exist for a query request.
When no records are returned for the resultset does anyone know why the SQL query statement will be printed / how to suppress this?? It is an intermittent problem that seems to occur when all the records are deleted and the page is refreshed.
As an example from the code snippet below - When the problem occurs I will see "select ContactFN, ContactLN, from Contacts where SubscriberNumber = 1 order by ContactLN" printed above my table column header.

code snippet:
<sql:connection id="conn1">
<sql river><%=strDatabaseJDBCDriver%></sql river>
<sql assword><%=strDatabasePassword%></sql assword>
<sql reparedStatement id="stmt1" conn="conn1">
select ContactFN,
from Contacts
where SubscriberNumber = <%=strCustomerID%> order by ContactLN
<TD WIDTH="150" HEIGHT="25" CLASS="categories" BACKGROUND="_images/black2_bg.gif">First Name </TD>
<TD WIDTH="150" HEIGHT="25" CLASS="categories" BACKGROUND="_images/black2_bg.gif">Last Name</TD>
<%-- loop through the rows/query --%>
<sql:resultSet id="rset2">

<TR ALIGN="CENTER" CLASS="copy2" BGCOLOR=\"#CCCCCC\" RECNUM=<sql:getColumn position="6"/> >
<td <%=strTableStyle%> >
<sql:getColumn position="1"/>
<td <%=strTableStyle%> >
<sql:getColumn position="2"/>

<td colspan="2">
No records found

</sql reparedStatement >
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic