Wrox Programmer Forums
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2006, 10:33 AM
Authorized User
 
Join Date: Apr 2006
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default How to handle locked documents

I have a program that goes through a directory and finds all word files and deletes their templates. I have it skipping read-only files but when it comes across a file that is locked because it is in use by another user, the program crashes and my exception handler won't catch it. I can't seem to find any way of checking for this and handling it. How can I catch these files or at least skip them?

 
Old May 18th, 2006, 02:23 PM
Authorized User
 
Join Date: Apr 2006
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Nobody has any ideas on this?

 
Old June 7th, 2006, 07:48 AM
Authorized User
 
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

have you used common exception handler i.e.,

catch( exception e )

plzzz supply some code





Similar Threads
Thread Thread Starter Forum Replies Last Post
Locked Database help?? invisible bunny king Classic ASP Databases 13 February 16th, 2007 02:50 AM
Locked Database Brendan Bartley Access 3 January 3rd, 2007 05:40 PM
Locked Cells dkr72 Excel VBA 1 December 13th, 2004 05:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.