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.

Kavika F avatar image Kavika F ♦ commented ·

Hi @Enrique Elizaga, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

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.

// Example that adds the integer 4 to the query as a string
int test = 4;
Table result = Table.query("SELECT * FROM GlobalTable1 WHERE [Col 1] == " + string.fromNum(test, 0) + " ORDER BY [Col 2]");
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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
@Enrique Elizaga This should be fixed in the latest release 22.1.2 - please try that.
2 Likes 2 ·
Claire Krupp avatar image Claire Krupp Jason Lightfoot ♦♦ commented ·

I can confirm this problem is fixed in version 22.1.2

1 Like 1 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Claire Krupp commented ·
Thanks Claire.
0 Likes 0 ·