On Fri, Nov 09, 2001 at 12:26:32PM -0800, Mike Bresnahan wrote:
> Class.forName("org.gjt.mm.mysql.Driver");
> try {
>     java.sql.Connection connection =
> java.sql.DriverManager.getConnection("jdbc:mysql://host/database", user,
> password);
>     try {
> 	java.sql.Statement statement = connection.createStatement();
> 	java.sql.ResultSet resultSet = statement.executeQuery("select foo from
> bar");
> 	while( resultSet.next()) {
> 	    System.out.println( resultSet.getString("foo"));
> 	}
>     }
>     finally {
> 	connection.close();
>     }
> }
> catch( java.sql.SQLException exception) {
>     exception.printStackTrace();
> }

_Thank you_ - now, if you want to change to another database it's enough
to change the java.sql.DriverManager.getConnection and Class.forName?

Another thing I'm wondering about is how placeholders work in Java?
(I'm assuming it has got that)

-- 
  Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
  mod_pointer <http://stderr.net/mod_pointer>