I would rig it so that the funtion set @ERROR, and if it was successfull, the user can assume the function returned an array, and if it not, just have the function return a 0 (zero).