Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
beleza galera?
Tenho uma procedure no SQL Server, que me retorna um valor por parametro ... em delphi, eu faço o seguinte:
vCodigoOperacao:= ADOStoredProc1.Parameters.ParamByName('@CODIGO').Value;Como eu faria o mesmo em ASP ???
E aew cara! beleza ? valeu pela dica ...
Show! apenas mudei isto
.CommandType = adCmdStoredProc
por isto:****
.CommandType = 4
Valeu aew ... abraço http://forum.imasters.com.br/public/style_emoticons/default/clap.gif
Exemplo:
ASP
Public Function xxx()
Dim oCmd : Set oCmd = Server.CreateObject("ADODB.Command")
With(oCmd)
.ActiveConnection = pConn
.CommandType = adCmdStoredProc
.CommandText = "sp_xxx"
.Parameters.Refresh()
.Parameters("@id") = pId 'envia para SP
.Execute()
pRet = .Parameters("@Ret") 'retorna da SP
End With
Set oCmd = Nothing
End function
na procedure ficaria assim
>
Create Procedure dbo.xxx
@id int,
@Ret int OutPut
As