Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

jsp SQL Problem

Options
  • 05-05-2009 5:25pm
    #1
    Closed Accounts Posts: 214 ✭✭


    Hey i''ve been trying to get a simple SQL statement to work for hours and i cant for the life of me figure out whats wrong with it, outputting the result just gives me: org.apache.taglibs.standard.tag.common.sql.ResultImpl@90eae7 (<- number keeps changing)

    Heres the code:
    <%@ page contentType = "text/html" %>
    <%@ taglib prefix = "c" uri="http://java.sun.com/jsp/jstl/core&quot; %>
    <%@ taglib prefix = "sql" uri="http://java.sun.com/jsp/jstl/sql&quot; %>

    <sql:setDataSource var="Books"
    driver="sun.jdbc.odbc.JdbcOdbcDriver"
    url ="jdbc:odbc:Books" scope ="session" />

    <html>
    <head>

    </head>


    <body>

    <sql:query var = "UserResult" dataSource = "${Books}">
    SELECT Username FROM Users

    </sql:query>

    <c:out value = "${UserResult}"/>

    </body>


    </html>


Advertisement