We had the same problems here: A SP called via COM+ took another Execution Plan then when the same SP is called via the Query analyser. You can see...
Not working here on 2000:select * from ::fn_get_sql(@handle)results in an error -> Must declare the variable '@handle'.
Separate names with a comma.