I am calling this function from another asp page and it is bombing on me. Any Ideas on how I can get this to work and return the value of the return code to me, or true if it successfully deleted the quote? Thanks in advance
function WV_DeleteQuotePortfolio(userid,symbol)
' replace act_WVDeleteQuotePortfolio.cfm
dim cmd, dbConn, retval
dbConn = GetConnection
Set cmd = Server.CreateObject("ADODB.Command"
with cmd
.ActiveConnection = dbConn
.CommandText = "WVDeleteQuotePortfolio"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("RETURN_VALUE", adInteger,adParamReturnValue)
.Parameters.Append .CreateParameter("@userid",adInteger,adParamInput, ,userid)
.Parameters.Append .CreateParameter("@symbol",adVarChar,adParamInput, ,symbol)
.Execute , , adExecuteNoRecords
retval = .Parameters("RETURN_VALUE"
end with
select case retval
case 1
WV_DeleteQuotePortfolio = "User not valid"
case 4
WV_DeleteQuotePortfolio = "User does not have this quote in his or her portfolio"
case else
WV_DeleteQuotePortfolio = ""
end select
Set cmd = Nothing
CloseDBConn(dbConn)
end function regards,
Brian
function WV_DeleteQuotePortfolio(userid,symbol)
' replace act_WVDeleteQuotePortfolio.cfm
dim cmd, dbConn, retval
dbConn = GetConnection
Set cmd = Server.CreateObject("ADODB.Command"
with cmd
.ActiveConnection = dbConn
.CommandText = "WVDeleteQuotePortfolio"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("RETURN_VALUE", adInteger,adParamReturnValue)
.Parameters.Append .CreateParameter("@userid",adInteger,adParamInput, ,userid)
.Parameters.Append .CreateParameter("@symbol",adVarChar,adParamInput, ,symbol)
.Execute , , adExecuteNoRecords
retval = .Parameters("RETURN_VALUE"
end with
select case retval
case 1
WV_DeleteQuotePortfolio = "User not valid"
case 4
WV_DeleteQuotePortfolio = "User does not have this quote in his or her portfolio"
case else
WV_DeleteQuotePortfolio = ""
end select
Set cmd = Nothing
CloseDBConn(dbConn)
end function regards,
Brian