Hi,

> There is a problem though: I could not connect to a previous database
> created with jdbc:h2:..  using jdbc:h2:nioMapped:... Is it normal? Is
> so, do you think that a future version will take care to make the
> database compatible?

No, it's not normal. Is there an exception? Could you post the stack
trace? If you have time, could you also create a very simple test case
that deletes the database, creates it with one mode and then opens it
with the other? Just edit the code below. It works for me (I also use
Mac OS X):

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import org.h2.tools.DeleteDbFiles;

public class Test {
    public static void main(String[] args) throws Exception {
        DeleteDbFiles.execute("~", "test", true);
        Class.forName("org.h2.Driver");
        Connection conn = DriverManager.getConnection(
                "jdbc:h2:~/test");
        conn.createStatement().execute(
                "create table test(n varchar) as select 'Hello'");
        conn.close();
        conn = DriverManager.getConnection(
                "jdbc:h2:nioMapped:~/test");
        ResultSet rs = conn.createStatement().executeQuery(
                "select * from test");
        rs.next();
        System.out.println("nioMapped: " + rs.getString(1));
        conn.close();
        conn = DriverManager.getConnection(
                "jdbc:h2:nio:~/test");
        rs = conn.createStatement().executeQuery(
                "select * from test");
        rs.next();
        System.out.println("nio: " + rs.getString(1));
        conn.close();
    }

}

Regards,
Thomas

--~--~---------~--~----~------------~-------~--~----~
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