You can translate the question and the replies:

How to get VQL command metadata response message using JDBC connection.

Hi Team, I am using JDBC connection to execute the VQL commands from my application. Let's say I want to create a role or modify the description of the role using 'Create /Alter command query' as shown in example below For example: Create role testrole; -- Creating new testrole in Denodo Alter role "testrole" 'description of testrole'; -- Updating the description of the testrole. When I read the response using JDBC executeUpdate() routine. I receive the response message as 0 rows affected and role is getting created/updated succesfully in Denodo. Ideally I would expect the VQL response message either "Role create succesfully" or "Role modified sucessfuly" as it does when we execute this VQL command in Denodo Tools => VQL Shell. But when we connect Denodo using JDBC connection and execute the vql queries, response returns as '0' rows affected. Do we have any concrete way to identify success/failure case to execute VQL command metadata information and it returns correct response like "Role create succesfully" or "Role modified sucessfuly" ? Thanks in Advance.
user
05-02-2020 17:35:07 -0500

3 Answers

Hi, Since **CREATE** and **ALTER** comes under **DDL** commands, I executed the method [executeVqlCommand(String)](https://community.denodo.com/docs/html/browse/7.0/vdp/javadoc/com/denodo/vdb/engine/storedprocedure/DatabaseEnvironment.html#executeVqlCommand-java.lang.String-) and I was able to obtain the respective response messages when creating/altering roles as it is displayed in VQL shell of Virtual Administration Tool. You could have a look at the [Executing VQL statements](https://community.denodo.com/kb/view/document/Executing%20VQL%20statements%20from%20a%20stored%20procedure?category=Custom+Elements) documentation for more information. Hope this helps!
Denodo Team
06-02-2020 07:05:55 -0500
Thanks for your response. I am not using Stored procedure to execute the VQL commands from Java Language. I am using node JS JDBC module to connect to Denodo server and executing the VQL command using the statement.executeQuery() or statement.executeUpdate() to run the VQL commands. This is something similar to how JDBCClient can connect and execute the VQL queries from Denodo server. I don't find a way to use executeVqlCommand(String) as it belongs part of StoredProcedure API. Do you have any suggessions how it can be done using the JDBCCLIENT code to get appropriate response message ?
user
06-02-2020 13:20:56 -0500
Hi, The Denodo JDBC Driver is capable of retrieving **only** the query **resultset** and the output/response messages of the query execution cannot be obtained. If in case I want to obtain the output of a query execution, I would develop a Custom Stored Procedure with the executeVqlCommand(query) command and then use this Stored Procedure in the JDBC Client code to get appropriate response message. You can have a look at [Developing Stored Procedures](https://community.denodo.com/docs/html/browse/7.0/vdp/developer/developing_extensions/developing_stored_procedures/developing_stored_procedures#developing-stored-procedures) section of Virtual DataPort Developer Guide for more information. Hope this helps!
Denodo Team
14-02-2020 07:18:59 -0500
You must sign in to add an answer. If you do not have an account, you can register here