Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

jsp SQL Problem

  • 05-05-2009 05: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