|
rrnml -> RE: redirect back to previous page (2/14/2005 13:33:33)
|
Where would I put the include? I will show you the code for the security page. I know it's kind of crazy and convoluted, but here goes.............. <% 'Check to see if the user is authorized to access this query. Dim strParm8 Dim strParm9 Dim strParm10 Dim errorflag Dim rst9 Dim strSQL9 strParm8 = Request.ServerVariables("Remote_User") strParm9 = Mid(strParm8,8,15) 'Response.write strParm9 'This field needs to exactly match the qrname field in the qrynamp file on the AS400 'strParm10 is the name of this query strParm10 = "CM/DM Query" Const adOpenKeyset = 0 Const adLockOptimistic = 1 'Create the objects Set con = Server.CreateObject("ADODB.Connection") Set rst9 = Server.CreateObject("ADODB.Recordset") ' Open the connection to the AS400 Database 'con.Open "Secondary", "user1", "password1" con.Open "Primary", "user1", "password1" con.CommandTimeout = 0 ' Create the SQL Query String ' User Access Query String strSQL9 = "select nmddta.qrynamp.qruser, nmddta.qrynamp.qrname, nmddta.qrynamp.qrflag " & _ " from nmddta.qrynamp Where nmddta.qrynamp.qruser = '" & strParm9 & "' and nmddta.qrynamp.qrname = '" & strParm10 & "'" 'Response.write strSQL9 server.ScriptTimeOut = 600 Set rst9 = Server.CreateObject("ADODB.Recordset") rst9.Open strSQL9, con, adOpenKeyset, adLockOptimistic IF NOT rst9.EOF then errorflag = rst9("qrflag") 'Response.write errorflag ''The query has been restricted using the AS400 Security menu selections. If errorflag = "N" Then Response.redirect Else Response.write strParm9 Response.write " <br> This query has been temporarily restricted...Please notify Security and your immediate supervisor for access." End If Else Response.write strParm9 Response.write " <br> This query has been temporarily restricted...Please notify Security and your immediate supervisor for access." End If %> <% rst9.Close con.Close %>
|
|
|
|