>>Then you're doing sqlexec() in the same method/proc/function. Most folks delegate it to some other place, where they have centralized the call, error handling, logging etc. For those cases they have to be private so they are visible in the called code.
>
>Yes, this is exactly the case. I think in the initial message to this thread I showed my code. My sqlexec() is in the same procedure where the variables are declared. So, do I understand it, that in this case, LOCAL variables are ok?
Obviously. They just need to be in scope, that's all.