Custom query database

wappler versions: wappler 3.2.0
MacOS Catalina 10.15.6
server NodeJS

Custom queries are not working…

with datagrip the same query returns results. Screen Shot 2020-08-24 at 10.29.14 AM

is anyone else experiencing this or know how to fix it?

try removing the ; ?

that doesnt work either… same result

removing the ; didnt change the outcome. does anyone else know what i can try?

You have the database connection selected? Seems like it can’t find your database.

Are you using MS SQL or MySQL? You have SQL selected in the editor. Try switching to MySQL?

Sorry, just guessing here.

i tried every variation that makes sense and nothing is different.

also tried to uninstall and reinstall… didnt work… and tried another datatable… also did not work… the only thing that works are regular database queries… still cant get custom queries to work.

Is there something I’m missing on my end? Or something I should try differently to get the query to work properly??@George @Teodor @Hyperbytes

Hi, could you perhaps answer me the following questions:

When exactly do you get the notification, is it after you try to execute it?

If you just save the custom query and then run the server action in the browser, does it return the results?

You are using NodeJS, do you use it with Docker?

using node with heroku. i get the notification a few seconds after i click the “execute query” button. When i run the server action…I get the response without error when inspecting with chrome dev tools… the problem is setting the schema without being able to see the preview query request.

You can set the schema by hand if you want, the query looks to run fine, it is only the execute in Wappler that isn’t working.

We will check why the execute is not running. The error looks like it isn’t finding the temporary file that should have been uploaded to the server with the custom query.

Which target do you have selected?

Hello, I’m having the exact same problem. You can save and use the custom query by setting the schema manually and saving it without running it in the editor.

If you execute the query it in the “Build Query” editor, you get an error as mentioned in the original post. err= Request Failed: error, Not Found.

(osx, nodejs, db = heroku postgresql)

Wappler 3.4.0
MacOS Catalina 10.15.7
Server ASP.NET

I’m also having some issues with the custom queries. Every time I execute the query, I’m getting this error message related to the remote FTP host. I don’t get any errors with other type of queries.

Screen Shot 2020-10-16 at 7.16.22 pm

The second issue is that the custom query is returning results with the Parameter P1 (to compare dates) in the custom query builder. I have entered a Test Value of 07/01/2017 (format MM/dd/yyyy) and the query is returning records as expected.

However, when I use the query in a Server Connect, it doesn’t return any result. If I remove the Parameter P1, the query starts returning result in Server Connect. Screenshots of the Parameter P1 set up and Query Results.

Screen Shot 2020-10-16 at 7.32.59 pm

Screen Shot 2020-10-16 at 7.33.22 pm

To run the query on your server a file called __exec_query.aspx is uploaded to your server. We need this file to actual be able to run it on your server and getting the schema and results.

My guess is that the date passed in the parameter is incorrect and that causes an empty result because it doesn’t match any records. Server Connect formats the dates as 2017-01-07, if your database expects it in a different format then you will need to use the formatDate formatter to change it in the desired format.

Hi @patrick,

The file _exec_query.aspx is correctly uploaded to the server each time a custom query is executed / saved. The custom queries also run correctly in the Server Connect. It’s the error message that keeps popping up when a custom query is executed in the Query Editor window.

Thanks for highlighting the possible reason for empty results when using the date parameters. I have formatted the input value that is expected by the database field. It’s working correctly now.

Thank you again for your help :slight_smile: