[color=#FF0000]Then I rebuilt ASP project picking up two new columns in my query, hiding them in the form and adding the code you provided in the events window.
<%
Sub AfterAdd()
'** Redirect to another page ****
Response.Redirect "Results_list.asp"
End Sub
Sub EditOnLoad()
set rstmp = Server.CreateObject("ADODB.Recordset")
rstmp.Open "select IsLocked, LockTime from " & strTableName & " where " & where, dbConnection
if rs("IsLocked")=1 and DateDiff( "n", rs("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 " & where
end if
End Sub
Sub AfterEdit()
'** Redirect to another page ****
Response.Redirect "../MessageBoxes/TRCReviewComplete.htm"
End Sub
%>
[color=#FF0000]I know get this error when I click the edit button for any record from the LIST.asp page:
ASP error happened
Technical information
Error number 450
Error description Wrong number of arguments or invalid property assignment
URL /FormsV2_1/TRCMember/TEST_TRCApprovalConsole/Results_edit.asp
SQL query select [ID], [GENERAL_INFORMATION], [Requester], [PMOwner], [MODReleaseDate], [MODReleaseTime], [ProductionReleaseDate], [ProductionReleaseTime], [CHARGED_TO], [ChargedTo], [ProjectWorkOrderName], [WONumber], [WOChargeType], [TYPE_RELEASE], [SelectSoftware], [SoftwareSub], [SelectInfrastructure], [InfrastructureSub], [COMPANIES_AFFECTED], [CompanyAffectedBunkerHill], [CompanyAffectedMWAC], [CompanyAffectedPILG], [PILGSub], [CompanyAffectedPRAC], [PRACSub], [CompanyAffectedPAL], [PALSub], [CompanyAffectedHP], [HPSub], [INFORMATION], [ChangesToBeMade], [SpecialInstructions], [MOD_CHECKLIST], [MODQ1Status], [Q1TechLeadApproval], [MODQ2Status], [Q2DBAAproval], [MODQ3Status], [Q3DBAApproval], [MODQ4Status], [MODQ5Status], [MODQ6Status], [Q6CommunicatedBy], [MODQ7Status], [MODQ8Status], [Q8VSSLabel], [MODQ9Status], [Q9CVSLabel], [MODQ10Status], [Q10EARLabel], [MODQ11Status], [ResourceID], [MODQ12Status], [PRODUCTION_CHECKLIST], [ChecklistItemTested], [ChecklistTechReview], [ProdTechReviewer], [ChecklistPostTesting], [ChecklistOperationalDocumentation], [ChecklistHelpDeskDocumentation], [ChecklistDevelopmentReleaseTeam], [Checklist5DayCommunication], [ChecklistBackoutRecovery], [ChecklistPrerequisites], [ChecklistSecurityIssues], [ChecklistSignOff], [ProdPMSign], [SignOff_Captured], [ProdVSSLabel], [txtProdVSSLabel], [ProdCVSLabel], [txtProdCVSLabel], [ProdEARLabel], [txtProdEARLabel], [WhoWillPreform], [OtherReleasor], [SOFTWARE_RELEASE], [CommonCode], [CodeBeingMoved], [How], [From], [To], [ApplicationBackOutProcess], [INFRASTRUCTURE_RELEASE], [ServerNames], [NetworkDeviceNames], [HardwareChanges], [DatabaseChanges], [OSSWFirmwareLevelChange], [ApplicationServicesAffected], [InfrastructureBackOutProcess], [BUSINESS_REQUIRMENTS], [ApplicationServiceLevel], [SystemRecovery], [BackUpRequirements], [RetentionPeriod], [SecurityConsiderations], [ATTACHMENTS], [Attachment], [ChecklistDesktopImpact], [txtStatus], [EMERGENCY_RELEASE], [EmergencyRootCause], [EmergencyPrevention], [EmergencyImpact], [APPROVALS_AND_STATUS_HISTORY], [TrueModDate], [TrueModReleaser], [TrueProdDate], [TrueProdReleaser], [TRC APPROVALS], [TRC_IF], [TRC_IF_Approvers], [TRC_IF_Approval], [TRC_IF-Comments], [TRC_AD_NE], [TRC_AD_NE_Approvers], [TRC_AD_NE_Approval], [TRC_AD_NE_Comments], [TRC_AD_NJ], [TRC_AD_NJ_Approvers], [TRC_AD_NJ_Approval], [TRC_AD_NJ_Comments], [TRC_DATA], [TRC_DATA_Approvers], [TRC_DATA_Approval], [TRC_DATA_Comments], [TRC_PUBLISHING], [TRC_Publishing_Approvers], [TRC_Publishing_Approval], [TRC_Publishing_Comments], [TRC_NETWORK], [TRC_Network_Approvers], [TRC_Network_Approval], [TRC_Network_Comments], [TRCNetworkResource], [TRC_WEBSERVICES], [TRC_Webservices_Approvers], [TRC_Webservices_Approval], [TRC_Webservices_Comments], [TRCWebservicesResource], [TRC_DATABASING], [TRC_Databasing_Approvers], [TRC_Databasing_Approval], [TRC_Databasing_Comments], [TRC_PRODSERVICES], [TRC_ProdService_Approvers], [TRC_ProdService_Approval], [TRC_ProdService_Comments], [ECCApproval], [EMERGENCY_CHANGE_APPROVALS], [ECPetruff], [ECPetruffComments], [ECWilson], [ECWilsonComments], [ECVerrier], [ECVerrierComments], [ECSmith], [ECSmithComments], [ECCasagrande], [ECCasagrandeComments], [ECReleaseDate], [ECCECAppSysEffected], [TrueModTime], [TrueProdTime], [ContactNumber], [DBAPassword], [ReleaserNotes], [Attachment2], [Attachment3], [Attachment4], [FirewallRequiredSelect], [FirewalDefinition], [TRC_SQLDBA], [TRC_SQLDBA_Approvers], [TRC_SQLDBA_Approval], [TRC_SQLDBA_Comments], [TRCSQLResource], [TRC_DB2DBA], [TRC_DB2DBA_Approvers], [TRC_DB2DBA_Approval], [TRC_DB2DBA_Comments], [TRCDB2Resource], [TRC_WINDOWSADMIN], [TRC_WindowsAdmin_Approvers], [TRC_WindowsAdmin_Approval], [TRC_WindowsAdmin_Comments], [TRCWindowsAdminResource], [TRC_WASADMIN], [TRC_WAS_Approvers], [TRC_WAS_Approval], [TRC_WAS_Comments], [TRCWASResource], [TRC_STORAGE], [TRC_Storage_Approvers], [TRC_Storage_Approval], [TRC_Storage_Comments], [TRCStorageResource], [AssignedResource], [TRC_AI], [TRC_AI_Approvers], [TRC_AI_Approval], [TRC_AI_Comments], [Impact], [Test_Section], [Test_Level_Applied], [Test_Documentation], [Test_Complete], [IsLocked], [LockTime] From [X_ReleaseRequest].[Results] WHERE ([txtStatus] in ('Ready for TRC Review','Ready for TRC review')) and ([Results].[ID]=2477)
Additional info Event: Call EditOnLoad(sWhere)
Any help would be great!!