jared.r.richardson / gmail.com wrote:
> Hi all,
>
> I'm tinkering with Yet Another Java Bridge
> (http://www.cmt.phys.kyushu-u.ac.jp/~M.Sakurai/cgi-bin/fw/wiki.cgi?page=YAJB)
> and a JDBC driver. I'm wondering if anyone has tried this and might
> have a few examples laying around?
>
> btw, YAJB works very nicely so far. :)
>
> Much thanks!
>
> Jared
> http://jaredrichardson.net

I'm getting there... here's a working example.

require 'yajb/jbridge'

JBRIDGE_OPTIONS = { :classpath =>
"/Users/jared/work/hypersonic/tinkering/lib/hsqldb.jar"}

include JavaBridge

jimport "java.sql.*"
jimport "org.hsqldb.*"


class_instance = jstatic Class
class_instance.forName("org.hsqldb.jdbcDriver" )

driver_manager = jstatic :DriverManager
conn = driver_manager.getConnection("jdbc:hsqldb:file:testdb", "sa",
"")
statement = conn.createStatement

statement.executeUpdate("CREATE TABLE child(c1 INTEGER, c2 VARCHAR)")