Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a Table Using a session Variable 1

Status
Not open for further replies.

originalxavier

Programmer
Mar 5, 2003
69
US
I am in need of help yet again and turn to the wonderful Tek-Tippers... Now that the flattery is out of the way...

I have a relatively sime ASP site that I want users to log in to so that they can update tables in an Access database. I have a session variable defined as MM_Username which I can successfully use to define a recordset filter (so it works).
The problem is this... When these users update the Access table, I want the table to "record" what user has updated the table. The problem lies in the fact that I do not want the users to see or at least not be able to change the "UpdatingUser" column. So I know who was the last to make a change.
I am unsure as to how to do this without having a field on the form which would populate with the data from the recordset which would not keep users from making changes...

Any suggestions would be appreciated and if need be, just ask me for more info (Like sample code)

Thanks in advance

Xavier

----------------------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far the Universe is winning."
Rick Cook
----------------------------------------
 
This is an ASP forum question, but here.

if you have a session var with the user name already just add it to the sql.

sql = "update table set fld1 = '"&request.form("fld1")&"'... &_
updateFld = '"&session.MM_Username&"'"
 
oops, see what happens when you can't be platform spacific:
session.MM_Username should be session("MM_Username")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top