The Windows GUI produces empty lists in some screens when querying the database via Indicium Basic. In one of these cases the view being queried loads quite some time and then throws a 502 error (verified in Firefox). In another one loading is quick but the server gives a blank answer. In both cases the GUI translates this into an empty list. Both cases are views. Here’s a URL as an example:
I don't see anything particularly weird about this URL.
Any ideas what could be the cause?
When connecting directly with SQL Server the GUI works fine. However we need to be able to use the end-product off-premise and in some cases the Windows GUI is the preferred method.
Best answer by Erwin EkkelView original
You mention it is a view, is the primary key unique on the view?
Thanks Erwin. It turned out there were indeed non-unique rows of data in these views. However in one view this still didn't fix the issue even though it loads rather quick via direct database connection in the windows gui. I worked around the issue by replacing the view with a table and a procedure to fill it. The data doesn't change much making it a good workaround for us.
What helped a lot is that the 2023.1 version of the platform allows to copy references (lookups and details) when copying a table. I didn't have to change much to get the same screen back. I'm very happy with that addition to the software factory. 😎 Perhaps for a next version the developers can also look into copying context, layout and default procedures?
The assignment is already copied with the copy task, if you mean actually creating a seperate control procedure, feel free to create an idea for this.
I've looked into the issue again. I checked with a query to be 100% sure the primary key of the view is unique. Indicium still replies with an invalid answer. In fact I have to kill the session of the query on sql server because it keeps eating up CPU time. I don't understand why because the same view in the Windows GUI via direct SQL server connection runs fine and with good performance.
This sounds like a performance issue. Try the following: instead of the select inside the view. Set a hardcoded row of data in the view. something like this:
select 1, 'test’, 3
If the view opens without problems with the hardcoded data you might have to tune the query.
Also the windows GUI and indicium have different ways to retrieve data therefor the execution plans probably differ and also the performance can differ. So even though they technically do the same from a sequel standpoint they do something completely different.
I did exactly as you said and hard-coded a single row of data into the view. This one row pops up in the Windows GUI via SQL. Via Indicium it produces another error:
“Indicium has encountered a unknown error, see the log from indicium for more information”
I looked in the Indicium basic folder for a log file but I don't see it. Where can I find the file? Hopefully that'll clear up things a bit.
There should be a logs folder in the indicium folder:
Found it. The logs shows several sections. This is the first part:
I've attached the full log file. Above section is at line 1115.
Unfortunately this view still hasn't been fixed in Indicium basic so we are sticking to the table equivalent of the view for the time being.
We have issues in other views also. For example one view produces the following error in Indicum basic log:
This normally only happens when the view doesn’t have an instead of update trigger. However it does and this error only occurs in the Windows GUI via Indicium basic. It works fine in Windows GUI via SQL and in the Universal GUI.
What is the best route to further debug these issues?
Which version of Indicium Basic are you using?
Roland is not available at the moment, but we use the last version (2023.1). We always try to use the current (last) version. Maybe we miss a couple of hotfixes, but not much more.
Hopefully you can sort our problems out, as we get a lot of messages from the business about this. Thank you!
This is surprising because there shouldn't be much of a difference between Indicium Universal and Indicium Basic when it comes to update statements. My first thought would be that the test scenarios are different (e.g. different database or different view). Could you have a look at the SQL statement produced by Indicium Basic through the SQL Server Profiler or a similar tool? I think this is the only way to troubleshoot this issue.
And regarding the other error message, it looks like the view might be returning a varchar value for a column that is marked as datetime in the model. Or something similar to that.
Hello Hugo and Roland,
what Vincent mentioned about the data type not corresponding to the domain used in the model, is likely what is causing the issue. From my own experience, Indicium is a bit more strict about these things than the Windows GUI is with a direct connection.
Hopefully this post might give you some guidance in finding the cause.
You can always try bullet point 3 for all columns to see if that stops the error and undo it till you get the error again of course.
A pointer to see if the view “understood” the data types as you thought it would be, check the object explorer and see what the columns of the view show you. On occasion you see that an expected DATETIME is suddenly showing VARCHAR:
(example from SSMS):