K
|
kaled2006 author 1/8/2008 |
Can any one help me please |
J
|
Jane 1/11/2008 |
Hi, Sub BeforeQueryEdit(strSQL,strWhereClause) set rstmp = Server.CreateObject("ADODB.Recordset") rstmp.Open "select IsLocked, LockTime from " & strTableName & " where " & strWhereClause, dbConnection if rstmp("IsLocked")=1 and DateDiff( "n", rstmp("LockTime"), now() )<20 then Response.write "Record is locked. Come back later" rstmp.close : set rstmp = nothing Response.end else rstmp.close : set rstmp = nothing dbConnection.Execute "update " & strTableName & " set IsLocked=1, LockTime=now() where " & strWhereClause end if End Sub ' BeforeQueryEdit |
K
|
kaled2006 author 1/11/2008 |
Thanks for help |
![]() |
Sergey Kornilov admin 1/14/2008 |
Use getdate() instead of now(). |
K
|
kaled2006 author 1/14/2008 |
Thanks for your help, |
K
|
kaled2006 author 1/16/2008 |
Anybody can help me about correcting this line DateDiff( "n", rstmp("LockTime"), getdate() )<20
|
L
|
lbragg 1/25/2008 |
i am trying to lock a record based on a checkbox being checked. I have made the checkbox c hecked when someone edits the record but when I have tried to set the edit befoe load event to look at the field to see if it is checked it still allows the record to be edited. Listed below is the modified code I have tried and still to to evail. Any suggestions would be appreciated. Thank You in andvance for your input. |