Problem: we have an (non-web) Utility application that processes account records in batches twice a month and the batch processing takes about an hour. I just built a CF application that allows customers to view and pay their account, but if a customer tries to access their account and their account happens to be in the batch being processed during the batch update, the CF app will try to run the account select queries seemingly forever. My understanding is that the Utility application locks the table being updated.
In order to prevent this, I have set a timeout="2" in the cfquery statements with a try/catch block around the query. Theoretically, if the query times-out due to the lock, then it will throw a database error, and in the catch block a local var is set that will cause a message to be displayed to the customer that their account is unavailable for monthly maintenance. To test this and see if it works, I am trying to find a way to lock a record in the database while I run the CF application to see if the catch block works correctly. We have tried "select for update" but it still allowed the select statements to run and the query did not timeout. Can anyone suggest a way to set an exclusive row lock or a better approach? We are using CFMX 7 and MS-SQL database. The Request Timeout setting in the CF Admin is enabled for 120 seconds. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213514 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54