create or replace package body kenny is
procedure sp

(
tipbusq in number,
codger in number default null,
salida in out globalpkg.rct1
)
as begin
if (tipbusq = 1) then
open salida for
select G.VDEGER as Gerencia, A.vdeare as Area, t.NAME as Expediente, s.LABEL as Tipo, s.starttime Inicio, U.vappat ApPaterno, U.vapmat ApMaterno, U.vnousr Nombre
from ULTIMUS.incident@leo t, ULTIMUS.step@leo s,
WORKFLOW.USR U, workflow.are A, workflow.ger G
where t.incident= s.incident and
t.name= s.name and
s.starttime =(select max(p.starttime)
from ULTIMUS.step@leo p
where p.incident= t.incident and
p.name= t.name)and
trim(s.CLIENT) = trim(U.USER_NT) and
U.CCOARE= A.CCOARE AND
A.CCOGER=G.CCOGER and
t.status = 1;
elsif (tipbusq = 2) then
open salida for
select g.ccoger, g.vdeger from workflow.ger g;
end if;
end sp

end kenny;
Y lo llamo con el siguiente código:
set MostTodosExp = Server.CreateObject("ADODB.Command")
MostTodosExp.ActiveConnection = obj
MostTodosExp.CommandText = "KENNY.SPU_ULTIMUS_BUSCAEXP"
MostTodosExp.CommandType = adCmdStoredProc
set parametro1 = MostTodosExp.CreateParameter("tipbusq",adVariant,a dParamInput,,2)
MostTodosExp.Parameters.Append parametro1
set SalidaMostTodosExp = MostTodosExp.Execute
De todos los manuales que he buscado, no veo porqué es que no debería funcionarme. Lo que me devuelve es un RecordSet vacío. La página funciona si es que hago la llamada con adCmdText, pero cuando uso el adCmdStoreProc. ya no obtengo nada. ¿Qué puedo estar haciendo mal?