
The correct SQL syntax should be the following: set schema schema1; I am not familiar with JDBC, but you can try to just execute this query instead of using the setSchema shortcut. Regards, Robin On 14-10-15 08:39, Vijay Krishna wrote:
Hi,
I am trying to connect a schema within a database directly through JDBC with the following Java code.
Connection con = DriverManager.getConnection("jdbc:monetdb://localhost/testUser", "monetdb", "monetdb"); con.setSchema("schema1");
But this throws the following exception.
Exception in thread "main" java.sql.SQLException: syntax error, unexpected '=' in: "set schema =" at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2525) at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:2273) at nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(MonetStatement.java:497) at nl.cwi.monetdb.jdbc.MonetStatement.execute(MonetStatement.java:338) at nl.cwi.monetdb.jdbc.MonetStatement.executeUpdate(MonetStatement.java:533) at nl.cwi.monetdb.jdbc.MonetConnection.setSchema(MonetConnection.java:1267) at batcave.Monet.main(Monet.java:11)
Is it really possible to connect to a specific schema? Or the only option is to query as "schemaName.tableName" ???
Thanks & Regards,
Vijayakrishna.P. Mobile : (+91) 9500402305.
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list