querying embedded database in netbeans using derby

You told us I have created an embedded database ... and added data to it.

Thus, this database must be visible in Netbeans Services.

enter image description here

NO ;create=true !
You should connect with the same URL you see in the properties. Nothing more.
Expand Database URL or look at the bottom.

enter image description here

 con = DriverManager.getConnection("jdbc:derby:C:/Dokumente und Einstellungen/Administrator/.netbeans-derby/sample","app","app");

In the embedded mode Derby runs within the JVM (Java Virtual Machine) of the application. In this mode only the application can access the database, e.g. another user / application will not be able to access the database.

Only one Application can acces the Database.
So disconnect in Netbeans Services, the Database you want to connect to in your Application.

Leave a Comment