this page is to verify that user has access to certain inventory...
the comma delimited memo field "AllAccessusers" contains the name "ADMIN" which is my test user...but the boolian did not change to true...what have I done wrong???
THANK YOU. JB
<%@ Language=VBScript %>
<%ID = Request.QueryString("ID"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
name = Request.QueryString("name"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Write ID & "J" & name & "B"
con1 = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("password.MDB"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
set rs1 = Server.CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
strSQL1 = "SELECT * FROM AuthorizedUsers WHERE suitenumber=" & ID
rs1.Open strSQL1, con1,1,3
IF rs1.EOF = true then
Response.Write "We have no suitenumber & ID in our database at this time."
%><a href="javascript:history.back()">Back</a><%
END IF
DIM QCMarray()
DIM VSGarray()
DIM Allarray()
DIM bool
IF rs1.EOF = false then
SUB find_name
bool = false
split(rs1("QCMusers,','"
)
split(rs1("VSGusers,','"
)
split(rs1("AllAccessusers,','"
)
FOR i = 0 to len(QCMarray)
IF name = QMCarray(i) then
bool = true
EXIT SUB
END IF
NEXT
FOR i = 0 to len(VSGarray)
IF name = VSGarray(i) then
bool = true
EXIT SUB
END IF
NEXT
FOR i = 0 to len(Allarray)
IF name = Allarray(i) then
bool = true
EXIT SUB
END IF
NEXT
END SUB
IF bool = true then Response.Redirect ID & "index.asp"
IF bool = false then
Response.Write "The user '" & name & " is not Approved for this suite at this time." & "'"
%><BR><a href="javascript:history.back()">Back</a><%
END IF
END IF
rs1.Close
set strSQL1 = nothing
set con1 = nothing
Response.End
--only those that do not try, fail--
the comma delimited memo field "AllAccessusers" contains the name "ADMIN" which is my test user...but the boolian did not change to true...what have I done wrong???
THANK YOU. JB
<%@ Language=VBScript %>
<%ID = Request.QueryString("ID"
name = Request.QueryString("name"
Response.Write ID & "J" & name & "B"
con1 = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("password.MDB"
set rs1 = Server.CreateObject("ADODB.Recordset"
strSQL1 = "SELECT * FROM AuthorizedUsers WHERE suitenumber=" & ID
rs1.Open strSQL1, con1,1,3
IF rs1.EOF = true then
Response.Write "We have no suitenumber & ID in our database at this time."
%><a href="javascript:history.back()">Back</a><%
END IF
DIM QCMarray()
DIM VSGarray()
DIM Allarray()
DIM bool
IF rs1.EOF = false then
SUB find_name
bool = false
split(rs1("QCMusers,','"
split(rs1("VSGusers,','"
split(rs1("AllAccessusers,','"
FOR i = 0 to len(QCMarray)
IF name = QMCarray(i) then
bool = true
EXIT SUB
END IF
NEXT
FOR i = 0 to len(VSGarray)
IF name = VSGarray(i) then
bool = true
EXIT SUB
END IF
NEXT
FOR i = 0 to len(Allarray)
IF name = Allarray(i) then
bool = true
EXIT SUB
END IF
NEXT
END SUB
IF bool = true then Response.Redirect ID & "index.asp"
IF bool = false then
Response.Write "The user '" & name & " is not Approved for this suite at this time." & "'"
%><BR><a href="javascript:history.back()">Back</a><%
END IF
END IF
rs1.Close
set strSQL1 = nothing
set con1 = nothing
Response.End
--only those that do not try, fail--