Hi, i need to user the values returned by a SP, but it doesn't work, this is the SP code:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO
ALTER PROCEDURE ConsultarSolicitud
@cod_solicitud as int,
@nombre as char(60) output,
--@Fecha_Inicio as date OUTPUT,
@area as char(30) OUTPUT,
@tipo_soporte as char(15) OUTPUT,
@descripcion_corta as nvarchar(50) OUTPUT,
@estado_solicitud as char(15) OUTPUT
AS
--, @Fecha_Inicio = s.Fecha_Inicio
select top 1 @nombre=u.nombre, @area = a.area,@tipo_soporte = ts.tipo_Soporte,@descripcion_corta = s.Desc_Corta ,@estado_solicitud = es.Estado_Solicitud
From solicitud s,usuarios u, areas a, tipo_soporte ts, estado_solicitud es
where s.cod_solicitud =(@cod_solicitud) and s.cod_usuario = u.cod_usuario and s.cod_area = a.cod_area and s.cod_soporte = ts.cod_soporte
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
************************************************** ***************
And i execute the SP from the ASPX form.
vb :
cmdTransaction = cmdConexion.BeginTransaction
cmdCommand.CommandType = CommandType.StoredProcedure
cmdCommand.Transaction = cmdTransaction
cmdCommand.CommandText = "CosultarSolicitud"
cmdParametro = New SqlParameter("@cod_solicitud", Me.cod_solicitud)
cmdParametro.DbType = DbType.Int32
cmdCommand.Parameters.Add(cmdParametro)
cmdCommand.ExecuteNonQuery()
nombre = (string)cmdCommand.Parameters["@nombre"].Value;
area = (string)cmdCommand.Parameters["@area"].Value;
cmdTransaction.Commit()
************************************************** ****************
The SP executes whitout problems, but i need to use the Output values, how can i do that?
Tks a lot,
FV