Hi,
I have a link that when clicked goes to a page and parses the unique ID for use on that page - displaying fields.
Thing is I want it so whoever clicks on the link locks it so other's can't follow the link. I've got most of it sorted by using a field in the database called 'status', when status is 1 then the record is locked (by default status = "0" ).
Problem is when the database is opened on the second page (where I actually want to change the status of ID record to 1 so its locked) its seems its read only.
I couldn't paste the exact code as I don't have it with me:
I think I probably require an SQL statement but i'm not sure and rstcurrent assigning just doesn't/won't work.Code:Dim ID ID = Request.QueryString("ID") Dim conCurrent Dim rstCurrent Set conCurrent = Server.CreateObject("ADODB.Connection") Set rstCurrent = Server.CreateObject("ADODB.recordset") conCurrent.connectionString = "driver={Microsoft Access Driver (*.mdb)};" & _ "dbq=/db/cdadg.mdb" conCurrent.Open strSQL="SELECT * FROM data WHERE Entry_ID=" & ID Set rstCurrent = conCurrent.Execute(strSQL) IF rstcurrent("status") = 0 THEN rstcurrent("status") = 1 rstcurrent("namelocked") = session("name") END IF
Can anyone help?
Hope I explained it ok![]()
thanks,
Housey




Reply With Quote