YAJB and JDBC?

  • Thread starter jared.r.richardson
  • Start date
J

jared.r.richardson

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)")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top