The problem is resolved.I had to add the username in front of the procedure name. This is not a new program and it was working without it. I changed something unrelated.

The user has execute priv. and there is synonym for the function, so it should work without the owner name when we call it. I think it is something to do with adodb.

Thanks for the reply,
Serpil