S
sean
HI,
I would like to know if I can some set a variable to return a single value
from a function using the set command. Is this possible?
Thanks in advance for your answer
Sean
SET test = ReturnValue(OptionID)
Function ReturnValue(ByVal OptionID)
Set adoCmd = Server.CreateObject("ADODB.Command")
adoCmd.ActiveConnection = db_conn
adoCmd.CommandType = adCmdStoredProc
adoCmd.CommandText = "sp_findoption"
adoCmd.Parameters.Append adoCmd.CreateParameter("pOptionID",adInteger)
adoCmd.Parameters("pOptionID") = OptionID
Set adoRec = adoCmd.Execute()
OptionValue = adoRec(1)
adoRec.close Set
adoRec = Nothing
Set adoCmd = Nothing
End Function
I would like to know if I can some set a variable to return a single value
from a function using the set command. Is this possible?
Thanks in advance for your answer
Sean
SET test = ReturnValue(OptionID)
Function ReturnValue(ByVal OptionID)
Set adoCmd = Server.CreateObject("ADODB.Command")
adoCmd.ActiveConnection = db_conn
adoCmd.CommandType = adCmdStoredProc
adoCmd.CommandText = "sp_findoption"
adoCmd.Parameters.Append adoCmd.CreateParameter("pOptionID",adInteger)
adoCmd.Parameters("pOptionID") = OptionID
Set adoRec = adoCmd.Execute()
OptionValue = adoRec(1)
adoRec.close Set
adoRec = Nothing
Set adoCmd = Nothing
End Function