I’ve got an ASP document that 5 years old. Actually I’m working with PHP but I must use ASP for a Windows Application. So I need someone to explain this function to me.
//DNS SETTINGS ARE INCLUDED ALREADY.
function Check_Is_Web_Locked()
dim cmdDB , Ret
OpenDatabase
Set cmdDB = Server.CreateObject("ADODB.Command")
With cmdDB
.ActiveConnection = DBCon
.CommandText = "TICT_CHECK_WEB_STATUS"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("RETURN_VALUE", adInteger, adParamReturnValue, 0)
.Execute,,adExecuteNoRecords
Ret = Trim(.Parameters("RETURN_VALUE"))
End With
Set cmdDB = Nothing
CloseDatabase
Check_Is_Web_Locked = Ret
end function
What does this function do?
Is “TICT_CHECK_WEB_STATUS” a stored procedure?
If it’s what are the columns that function looking for?
Yes,
TICT_CHECK_WEB_STATUSis a stored procedure in the database. This SP returns a “signed integer” output parameter calledRETURN_VALUE, whose value gets stored in theRetvariable when it is returned from the SP.The
Trimfunction should strip out any white-space fromRETURN_VALUE, but since it is an integer there will never by any. Therefore it is simply converting the return value into a string.Finally the function is returning the
Retstring. This is done with theCheck_Is_Web_Locked = Retstatement.