I’m unable to query the Order Details table in the Northwind sample database.
My server model is ASP.NET connected to a SQL Server database.
I’m getting the following error:
Any idea what might be wrong?
I’m unable to query the Order Details table in the Northwind sample database.
My server model is ASP.NET connected to a SQL Server database.
I’m getting the following error:
Any idea what might be wrong?
Can I get someone to take a look at this? I’m trying to do a proof of concept and keep running into blockers. How do I figure out what’s wrong here?
Thanks!
Sorry, not an ASP guy here but can you take a screenshot or something of your query so we can see what you are trying to do?
Yes, it’s very simple. Just create a database connection to SQL Server with the sample Northwind database installed and create server action that queries the Order Details table:
Then open it in a browser. That’s when I get the error.
BTW, I just tried it in a PHP project, and it works just fine.
I say it works fine, but I’m having problems with the IN operator now.
Setting a condition to: OrderID IN (10248,10249,10250,10251,10252,10253,10254,10255)
See if you can get this to work:
Not working in PHP or ASP.NET… 
The IN operator requires an array of values, not a string. ASP.NET is very strict with the input and the error you are getting is from casting your string to an array which is not possible. Use an expression to pass an array like {{[10248,10249,10250,10251]}}.
Yes, that works on the Orders table and in PHP on both the Orders and Order Details tables, but I can’t get it to work on the Order Details table in an ASP.NET project. Does it work for you on the Order Details table in the Northwind database?
Actually, I should say I can’t query the Order Details table period. Even without any conditions.
Hi @dan65h, from the screenshot, the table name FROM "Order Details" is showing with double quotes "". The table name should appear as FROM Order Details. You can check the json file whether the table name has additional double quotes "" by right clicking on the SA file name and opening it in the editor. Or recreate the SA and check whether the table name is appearing correctly.
The table name has a space in it and that could be the reason this is being interpreted as a string.
The Query Builder in Wappler is doing that and I can’t edit it. And, it seems to be doing that for all tables.
Here it’s doing it for Orders, Customers and Employees, even though none of them have spaces:
Just discovered if I remove the Discount column, it works. Must be something with the Discount column that is breaking it…