Query binding, preview is returning null but works as named queries

So I have a named query that works, but when I bind it as a query bind it returns null

named query:
image

query binding:

I'm not sure why it does not work when it is referenced in binding but works in the name queries space

Do you need a schema name there? Try without it

yes, that would do it, when I was inputting the URL I forgot to put
'/databasename' so i need to reference it in my code but now that your brought this point up I made the correct adjustments and no longer need a schema and it functions.
Thanks!

1 Like

Hi there, i am having the same issue and I cant get the binding to return ANYTHING... the named qry works fine with and without parameters ... any help is appreciated

Screenshot 2024-10-18 175536

For me when I was establishing the database connection in the gateway I did not apply a schema for it to connect too, try to make sure you followed the correct connection parameter and configuration. Show me pictures of that if possible

SELECT dbo.tblmeterreads_CB.DateTimeRead AS t_stamp,
dbo.tblmeterreads_CB.kwh AS usage
FROM dbo.tblmeterreads_CB

this statement works in qry test but not returning anything when binding
i tried both ways with the gateway set up and still no luck.

its a sql server 2022....

Screenshot 2024-10-19 110812
Screenshot 2024-10-19 102747

it must be something so stupid that i am overlooking...
is there a log that will show exactly what is used in binding?

so as anticipated was something really stupid... you have to save the project every time a named query is created or updated ...!!!

sorry took me so long to respond but yeah i pretty much had the same issue, its always something stupid lol. Congrats on finding it though!