question

Enrique Elizaga avatar image
0 Likes"
Enrique Elizaga asked Jason Lightfoot commented

Why debugging SQL crashes in FlexSim 2022 Update 1?

Hi, when I run the model it runs perfectly. When i debug step by step it says "no resolvable tables" and it fails.

I attach the model with a debugging tick. If the problem cannot be solved can you please convert my file to the previous version where this doesn´t happen?


Aliaxis Red V0_14.fsm

FlexSim 22.1.1
sql querydebugging
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Jason Lightfoot commented

This is a known bug in the current version (see answer on this post).

https://answers.flexsim.com/questions/120454/error-in-tablequery-after-upgrade-to-2211.html

In my experience it only affects queries that use the $-syntax to pass in parameters. If you splice the parameters directly into the query string the error shouldn't occur.

  1. // Example that adds the integer 4 to the query as a string
  2. int test = 4;
  3. Table result = Table.query("SELECT * FROM GlobalTable1 WHERE [Col 1] == " + string.fromNum(test, 0) + " ORDER BY [Col 2]");
  4. return result.numRows;
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.