public static Connection getConnection() {
        Connection con;
        try {
            Class.forName("org.h2.Driver");
            con = DriverManager.getConnection(
                    "jdbc:h2:tcp://localhost/store;FILE_LOCK=NO", "root",
"password");
            return con;

        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

2009/12/9 moshi <[email protected]>

> Hi,
> If someone here is working with H2 db and can give me any advice, i'll
> very appreciate it.
> I'm working with H2 db and suddenly I started to get : Connection is
> broken [90067-122] stack trace
> When I invoke my java application.
> I have the database, and I'm connecting it with the H2 console
> successfuly.
> Any idea ?
> Just to clarify it: I'm connecting with tcp like this: jdbc:h2:tcp://
> localhost//C://myDB;FILE_LOCK=NO
> Thanks.
>
> --
>
> 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]<h2-database%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>
>
>

--

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.


Reply via email to