<%@ page import="org.w3c.tools.jdbc.*" %>
<%@ page import="java.sql.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
  <head>
    <title>SELECT EXAMPLE</title>
  </head>

  <body>
    <h1>Username list</h1>
<%
    JdbcServer server = 
        JdbcServer.getServer("jdbc:postgresql://w3c6.inria.fr/dvddb", // uri
                             "joeuser", // user
                             "dvd-db",  // password
                             "org.postgresql.Driver"); // driver
   ResultSet set = server.runQuery("SELECT username FROM accounts", true);
   if (set.first()) {
       do {
%>
       <%= set.getString(1) %><br>
<%
       } while (set.next());
   }
%>


    <hr>
    <address><a href="mailto:bmahe@w3.org">Benoit Mahe</a></address>
<!-- Created: Tue Oct  3 11:25:28 MET DST 2000 -->
<!-- hhmts start -->
Last modified: Tue Oct  3 11:38:43 MET DST 2000
<!-- hhmts end -->
  </body>
</html>
