Single Query Not Working Reliably in ASP .NET / MSSQL

In an ASP .NET app, when single query step is returning below error:

I have few other tables and Server Actions, where single query is working fine, but not always.
Have tried creating a new SA with just 1 single query, but it fails.

What I have found is that if the query returns more than 1 row, its bound to either return this error or just return null.
But if I add WHERE conditions to ensure that only 1 row is returned, it works.
Also, if I add a single query directly, it just does not work. But if I change it to multi-query and back to single, or just add multi-query to start with and change it to single, it starts working again.

This looks like a bug, but not entirely sure. Please help.

Are there other actions in the action file or the query the only one?

Seems to me it is more the input variables like $_GET or $_POST that you have defined and their validation rules.

What exactly do you have there and what is the real value posted?

Query is the only step. Nothing else in the SA.

Nothing POSTed or sent via GET. The input section is empty as well… no variables defined anywhere.

Does the error go away if you have a second step in it? You could add just a comment step for testing.

Here is the latest Server Connect file, the last update had a fix for actions with a single step.

DMXzone.ServerConnect.zip (56.6 KB)

@patrick The update did not work.
I am still seeing a NULL response when the single query step has multiple rows being returned.
I also added a set value step after the query, but no change.

Thx, then it seems to be a different issue, will investigate.

1 Like

Hi @patrick. Any luck with this?

Can you send me the json of your action file, I know where it goes wrong but don’t know when and why it happens. It has to do with the meta data inside the action file.

File sent via personal message.

Fixed in Wappler 5.0.3

This topic was automatically closed after 32 hours. New replies are no longer allowed.