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(); } > -----Original Message----- > From: tclug-list-admin at mn-linux.org > [mailto:tclug-list-admin at mn-linux.org]On Behalf Of Thomas Eibner > Sent: Friday, November 09, 2001 8:36 AM > To: tclug-list at mn-linux.org > Subject: Re: Learning CGI Database Wizardry (Was Re: [TCLUG] PostgreSQL > Ad vocacy (was Re: <TROLL> (was ...))) > > > On Fri, Nov 09, 2001 at 08:20:23AM -0600, > Phillip.J.Crump at WellsFargo.COM wrote: > > perl := yuck > > java := good > > Instead of trolling why don't you show us how the same thing would have > been done in Java? > > -- > Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/> > mod_pointer <http://stderr.net/mod_pointer> > > _______________________________________________ > Twin Cities Linux Users Group Mailing List - Minneapolis/St. > Paul, Minnesota > http://www.mn-linux.org > tclug-list at mn-linux.org > https://mailman.mn-linux.org/mailman/listinfo/tclug-list