Thanks stan

However the error still occurs if I call it using exec :c:= testfunc. I have packaged that functiom

I am getting the result if I do something like

"select testfunc from dual"

Right Now I have asked VB people to use this query in their report writer but not really understood the logic behind not running this FUNCTION.

If I change varchar2 return type to number and then return some temporary no.s then it works very well with 'exec' function. So is there any problem with varchar2 return type only.

Amol