From FAQ and tutorial
How to Connect to a Database?
The database driver is |org.h2.Driver| , and the database URL starts
with |jdbc:h2:| . To connect to a database using JDBC, use the following
code:
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
Using JRuby and Sequel:-
Sequel connect code uses the single parameter form of get connection.
Mysql works OK with the single parameter form
"jdbc:h2:~/test?user=myuser&password=mypwd"
H2 in this form just considers the database name to be
"test?user=sa&password=sa"
Can h2 use the single parameter method?
Thanks
Paul Fraser
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---