How to connect to default database in javaAction?

0
Hi, all. Now I am trying to execute sql in default database. When I use the follow code to connet to the  default database.         String db = "jdbc:hsqldb:hsql://localhost/default;ifexists=true";         String user = "SA";         String password = "";          conn = DriverManager.getConnection(db, user, password);  I got a error:  <java.net.ConnectException: Connection refused: connect> What’s wrong in my code? How can I  connect to default database in javaAction?
asked
1 answers
7

Hi Jack,

You no need to create JDBC connection you can directly retrieve value using..

List<IMendixObject> result = Core.retrieveXPathQuery(this.getContext(), "//module.entityname[xpath]");

answered