facebook

Can’t see database result.

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #222422 Reply

    wk3000sg
    Member

    I am having problem printing result in the database.
    I had a method that returns DataRow. And in display.jsp, i have a display method. I suspect that the method in display.jsp is causing the problem.
    Can anyone help me?

    public DataRow execSelectQuery(String sql){
    try{
    if (connection == null)
    return null;
    Statement s = connection.createStatement();
    return new DataRow(s.executeQuery(sql));
    }catch (SQLException e) {
    e.printStackTrace();
    return null;
    }

    void printData(DataRow data, javax.servlet.jsp.JspWriter out) throws IOException{
    List list = new ArrayList();
    while( (list = (List)data.nextRecord()) != null){
    out.println(“<TR>”);
    for (Iterator it=list.iterator(); it.hasNext(); ) {
    out.println(“<TD>” + it.next() + “</TD>”);
    }
    out.println(“</TR>”);
    }

    #222475 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft dev

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Can’t see database result.

You must be logged in to post in the forum log in