Web tier: servlets, JSP, Web frameworks: dbtags with queries ??? urgent please

  1. dbtags with queries ??? urgent please (1 messages)

    Hi, I am trying to use dbtags like this :

    <FORM NAME="productGoto">
    <FONT FACE="Arial,Helvetica" SIZE="-2">
    <sql:statement id="stmt1" conn="conn1">
        select * from pcinfo
        order by User
      <%-- loop through the rows of your query --%>
      Select By User:
    <SELECT NAME="productList" onChange="gotoFunction()" onBlur="return options[0].selected = true">
       <OPTION VALUE=" "> Categories </OPTION>
      <sql:resultSet id="rset2">
        <OPTION VALUE= '<sql:escapeSql><sql:getColumn position="2"/></sql:escapeSql>'> <sql:getColumn position="2"/></OPTION>

    But wheever I change the query from "select * from pcinfo order by User" to "select * from pcinfo order by User" I got this error :
    Error: 500
    Location: /pcinfo/pager-jdbc.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: java.sql.SQLException: Column index out of range.
  2. dbtags with queries ??? urgent please[ Go to top ]

    If you get this error , there is a sytax error on your page..see carefully..u would have missed..<% %>..like this..