%@ page language="java" session="true" info=""%>
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<%!
static {
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
}
catch (Exception e) {
//n = n + "Unable to load the driver
" + e.toString() + "
";
System.err.println("Unable to load the driver.");
e.printStackTrace();
}
}
String showTable() {
StringBuffer buf = new StringBuffer();
int cnt = 0;
try {
Connection conn = DriverManager.getConnection("jdbc:mysql://oberon.ssw.uni-linz.ac.at/test?user=ssw");
Statement stat = conn.createStatement();
ResultSet res = stat.executeQuery("SELECT * FROM registration order by regdate, regtime;");
ResultSetMetaData meta = res.getMetaData();
buf.append("
" + meta.getColumnName(i) + " | "); } buf.append("|
---|---|
" + res.getString(i) + " | "); } //buf.append("Delete | "); buf.append("