>James, thank you for the stars, but I think they should be given to Sergey.
>he is the man who thought about EXECSCRIPT() first. After that everything was easy :-)
I'm not sure EXECSCRIPT is the best approach here. To me setting procedure, executing the function, restoring the procedure sounds a bit easier.
If it's not broken, fix it until it is.
My Blog