The program uses H2 and by itself works correctly. Connects to the database, creates a table, reads data, stores, edits, everything is ok.

String url = "jdbc:h2:./h2db"; Connection connection = DriverManager.getConnection(url, name, pass); 

And then I apparently understand something wrong, well, in general, if I try to just (outside the application) open the database file (in my case it is h2db.mv.db) through the Data Source (using a URL or Path) I have a connection but obviously not with my base because there are no tables in it. I guess that the Idea somewhere creates another base because when you first connect, it doesn't matter what password or user I specify - the connection still happens.

Plus, when I try to open via Data Source from Path and point to my file, the Idea creates another database file in the same folder, it also adds "mv.db" to the old name.

Please tell me, is it possible in principle to view databases created directly in the application through the Database, and how is this done?

    0