In my application I want to use a database that needs no install and
that can be access directly (not thru ip-access), preferably packed in
a single (jar-) file.
I was looking at H2, but all examples I see make use of it thru a web-
path. Is what I want possible with H2? And if it is, can anyone show
me some sample code of how to make a connection and do a simple select
query?
What you are looking for is the simplest of all H2 connection modes,
embedded mode. Here are a few useful links in the documentation:
http://www.h2database.com/html/features.html#connection_modes
http://www.h2database.com/html/features.html#database_url
http://www.h2database.com/html/features.html#embedded_databases
http://www.h2database.com/html/tutorial.html#connecting_using_jdbc
Once connected just use standard SQL DDL and DML. The H2 grammar details
are here:
http://www.h2database.com/html/grammar.html
Regards,
Peter
--
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.