Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2006, 15:29
k3n
 
Fecha de Ingreso: marzo-2006
Mensajes: 56
Antigüedad: 19 años, 2 meses
Puntos: 0
USO DE STORE PROCEDURES - teóricamente, me parece todo correcto.

Holas a todos. Estoy llamado a un procedimiento almacenado que es el siguiente:

create or replace package body kenny is

procedure spltimus_buscaexp
(
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 spltimus_buscaexp;

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?