UniScript and specific SELECT script won't work

UniScript and specific SELECT script won't work

Hi,
I use Uniscript with Interbase 7, and with this particular script, nothing append on the DB :
  1. SELECT GEN_ID( my_gen, MAX(id) - GEN_ID(my_gen, 0)) FROM my_table;
(The generator my_gen should have taken the max value of my_table.ID).
And no error were triggered.

It works well directly in IBConsole.

Have you an idea ?

Thanks

Thomas

PS: maybe a clue : if I write this with an UPDATE instead of a SELECT, it works (but what a weard way to proceed...)
  1. UPDATE MY_TABLE SET ID= (SELECT GEN_ID( MY_GEN ,  MAX(ID) - GEN_ID(MY_GEN , 0)) FROM MY_TABLE) WHERE ID=(SELECT MAX(ID) FROM MY_TABLE);