Thanks for anybody who replied and again my apology for the easiness i charged firebird for the problem...
The problem's reason and the solution for any who may concern: As some of repliers said the problem was in memory management of delphi under concurrent threads. After 15 years using delphi, i discovered by googling the variable IsMultiThread Adding in initialization section the following line IsMultiThread :=true; everything is ok, also using superclassic (at least in my machine). PS1: <IsMultiThread :=true> is silently done by Delphi itself, if threads exist in the uses list. Bad for me, my functions where pretty simple and so threads unit was not declared in uses. PS2: I think that this could be a major trap for many delphi programmers and that a relative note in documentation about UDF with Delphi in <http://www.firebirdfaq.org/faq83/> http://www.firebirdfaq.org/faq83/ should be added Best Regards A.Kyriakos Athens, Greece
