i want to return a value frm storedprocedure as "output parameter" iam using
following code
Code: Select all
oParameter:=CreateObject("ADODB.Parameter")
oCommand:=CreateObject("ADODB.Command")
oCommand:ActiveConnection = oCon
oCommand:CommandText:="Sp_Job1"
oCommand:CommandType:=adCmdStoredProc
oCommand:PARAMETERS:Append:CreateParameter("Ename", adVarChar,adParamInput,cName)
oCommand:PARAMETERS:Append:CreateParameter("Job", adVarChar,adParamInput, cJob)
oParameter:=oCommand:CreateParameter("@Jcode",adVarChar, adParamOutput,50)
oCommand:PARAMETERS:Append:CreateParameter("@Jcode", adVarChar,adParamOutput, 50)
oCommand:Execute()
MsgInfo( cmd.Parameters("@Jcode"))
Sajith