Skip to main content
March 25, 2009
Question

ASP VBScript , Remote_User server variable, and Access DB

  • March 25, 2009
  • 13 replies
  • 1867 views

I need to recreate some ASP pages that were orginally created in MS FrontPage once upon a time.

I have a table in an Access DB that contains the user's login ID. I need to pull the date the user completed a quiz at the end of a web training module.

My connection looks OK, b/c I can pull other info. I can pull the quiz completion date if I put in my login ID. The login ID is called Email in the DB and the completion date is called Time.

This works:

SELECT [Time]
FROM QuizComplete
WHERE Email = 'OCSP/BUTLER_A' AND QuizID = 109

How do I change the WHERE Email so it filters by the Server Variable Remote_User?

Thanks!
This topic has been closed for replies.

13 replies

Inspiring
March 26, 2009
Amy_L wrote:
> Thanks Dooza
>
> I tried it but I'm doing something wrong. I tried your value and a couple
> different variations- without the < >, with =%, with single quotes- and I get
> syntax error messages.
>
> Can you walk me through it?

It might need to be entered as just Server.Variable("REMOTE_USER")

Dooza
--
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
How To Report A Bug To Adobe
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
March 25, 2009
Thanks Dooza

I tried it but I'm doing something wrong. I tried your value and a couple different variations- without the < >, with =%, with single quotes- and I get syntax error messages.

Can you walk me through it?

Inspiring
March 25, 2009
Amy_L wrote:
> I need to recreate some ASP pages that were orginally created in MS FrontPage
> once upon a time.
>
> I have a table in an Access DB that contains the user's login ID. I need to
> pull the date the user completed a quiz at the end of a web training module.
>
> My connection looks OK, b/c I can pull other info. I can pull the quiz
> completion date if I put in my login ID. The login ID is called Email in the
> DB and the completion date is called Time.
>
> This works:
>
> SELECT [Time]
> FROM QuizComplete
> WHERE Email = 'OCSP/BUTLER_A' AND QuizID = 109
>
> How do I change the WHERE Email so it filters by the Server Variable
> Remote_User?
>
> Thanks!

In the recordset, enter this as the value
<%=Server.Variable("REMOTE_USER")%>

Dooza
--
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
How To Report A Bug To Adobe
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform