Here is (obviously part of) my current code:
getinfo = "select ID,docfilename, doctitle, phase, member, doctype, active from " & documenttable
uname = session("username")
getinfo3 = "select ID,docfilename, doctitle, phase, member, doctype, active from " & documenttable & " where member = " & uname
if session("UserType") = "Admin" then
set rs = DB_editCmd.Execute(getinfo)
else
if session("UserType") = "User" then
set rs = DB_editCmd.Execute(getinfo3)
end if
end if
if rs.EOF and rs.BOF then
response.write "Empty Database"
else
<<<<----OUTPUT THE RECORDS---->>>>
I've tried so many options and none of them work! At the moment I get the
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
error. Other ways I've tried to get the coding working, it appears to work initially, but ignores the WHERE statement so just outputs everything like the first getinfo SQL statement. I know for sure the session variable has the username in, and if you hardcode "WHERE member = companyname" (where companyname is a name in the database) it works perfectly!
getinfo = "select ID,docfilename, doctitle, phase, member, doctype, active from " & documenttable
uname = session("username")
getinfo3 = "select ID,docfilename, doctitle, phase, member, doctype, active from " & documenttable & " where member = " & uname
if session("UserType") = "Admin" then
set rs = DB_editCmd.Execute(getinfo)
else
if session("UserType") = "User" then
set rs = DB_editCmd.Execute(getinfo3)
end if
end if
if rs.EOF and rs.BOF then
response.write "Empty Database"
else
<<<<----OUTPUT THE RECORDS---->>>>
I've tried so many options and none of them work! At the moment I get the
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
error. Other ways I've tried to get the coding working, it appears to work initially, but ignores the WHERE statement so just outputs everything like the first getinfo SQL statement. I know for sure the session variable has the username in, and if you hardcode "WHERE member = companyname" (where companyname is a name in the database) it works perfectly!