Re: Cayenne and H2 on the desktop

From: Mike Kienenberger (mkienen..mail.com)
Date: Tue Oct 20 2009 - 20:10:18 EDT

  • Next message: Michael Gentry: "Re: Cayenne and H2 on the desktop"

    Do you want the database to be a single-user resource which is
    persisted between runs?

    If so, it should be as simple as using jdbc:h2:~/test/testdatabase as
    your jdbc url where "~/test/cistestdatabase" is the path to your
    database (it will be a directory). Most likely, this is what you
    want.

    Using jdbc:h2:tcp://localhost/~/test/testdatabase will connect as a
    standard standalone database instance and assumes you started it
    standalone. This is now multiuser.

    The list for technical questions is a google group.

    http://groups.google.com/group/h2-database

    On Tue, Oct 20, 2009 at 8:00 PM, Eric Lazarus <ericllazaru..ahoo.com> wrote:
    > Folks
    >
    > Thanks for you folks direction on using H2 as our database but we are a bit stuck on how to do it. We are moving toward using Cayenne 3.0M6 and H2 for the desktop version of an application that should be as idiot proof as possible. We want for the end user to not have to understand that there is a database there at all.
    >
    > Any suggestions about how we should configure things? For example, should we configure H2 to run embedded if we don't want the end user to have to be aware of it? How DO we configure it that way? What should we be reading to figure out how to do that? I am not even sure we understand what it means to run "embeded." Does that mean that that database is in the same VM? That we don't go via JDBC at all?
    >
    > Also, we are trying to load a postgres dump into H2 and am failing because H2 does not support the COPY statement. I have tried enabling postgres compatibility mode by appending ';MODE=PostgreSQL' to my database url. This results in a error message stating 'File not found 'backup.sql'. I tried putting my dump in a file by that name and got the same message.
    >
    > I also tried sticking 'SET MODE PostgreSQL ;' at the top of my SQL dump file. This had no effect the script still abended with a syntax error on the COPY command.
    >
    > Where the best place to ask H2 questions? Is there an IRC room? A list serve?
    >
    > thanks!
    >
    > Eric
    >
    > +1 (917) 589-6579
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Oct 20 2009 - 20:11:11 EDT