| | |
| ... | |
| Dim L_Ado_Conn ' ADODB.Connection Object | |
| Dim objCommand | |
| Dim iUserName | |
| Dim oAccessType | |
| | |
| 'Creating the Connection and RecordSet Objects | |
| Set L_Ado_Conn = Server.CreateObject("ADODB.Connection") | |
| Set objCommand = CreateObject("ADODB.Command") | |
| | |
| 'Opening the Database connection | |
| L_Ado_Conn.open Session("connection") | |
| Set objCommand.ActiveConnection = L_Ado_Conn | |
| | |
| objCommand.CommandType = adCmdStoredProc | |
| objCommand.CommandText = "sp_get_ValidUser" | |
| | |
| Set iUserName = objCommand.CreateParameter("User", adVarchar, adParamInput, 30) | |
| Set oAccessType = objCommand.CreateParameter("Access", adVarchar, adParamOutput, 10) | |
| | |
| objCommand.Parameters.Append iUserName | |
| objCommand.Parameters.Append oAccessType | |
| | |
| objCommand("User").Value = Session("CreatedBy") | |
| | |
| objCommand.Execute | |
| | |
| if isnull(objCommand.Parameters("Access").Value) = true then | |
| response.redirect("error.asp") | |
| else | |
| Session("UserType") = objCommand.Parameters("Access").Value | |
| End if | |
| ... | |
| | |