Ver Mensaje Individual
  #7 (permalink)  
Antiguo 19/11/2007, 08:45
nancy8120
 
Fecha de Ingreso: enero-2006
Mensajes: 233
Antigüedad: 19 años, 4 meses
Puntos: 2
Re: Sintaxis para recoger un parametro de un store procedure

gracias pero sigo sin veer el error

el error q me manda es el siguiente
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

mi codigo
<%
set conSRG=Server.CreateObject("ADODB.Connection")
Set cmdSRG = Server.CreateObject("ADODB.Command")
'Abre Conexión a Base de Datos SRG
conSRG.Open Application("DSN_SRG")
response.write conSRG
'cmdSRG.CommandType=4
Set cmdSRG.ActiveConnection = conSRG

cmdSRG.CommandText = "{ call SP_VTHistoryRep(?,?)}"
cmdSRG.parameters.append cmdSRG.createparameter("Num",adInteger, adParamOutput)
cmdSRG.parameters.append cmdSRG.createparameter("PsNumReporte",adVaChar,adP aramInput)
cmdSRG.parameters("PsNumReporte")="07-999-1679"
cmdSRG.Execute

%>


mi store procedure

CREATE procedure SP_VTHistoryRep(@PsNumReporte Varchar(13)=Null,@Num int=Null OUTPUT)as

--verifica
begin
declare @Encontrado int
Set @Encontrado= (Select count(*)from THISTORYREP where @PsNumReporte=sNumReporte)
if @Encontrado > 0
Select @Num =1
else
Select @Num=0
end
GO

Muchisimas gracias
Sludos