473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Testing for File access

When opening a file in two different threads at the same time, it will cause
an exception if the FileShare modes are incompatible with the FileAccess
modes.

Is there some way to test whether access will be allowed to the file without
having to try opening it and get an exception?
Jul 21 '05 #1
1 1251
No, there is not, but why are the Fileshare modes incompatible if you need
to share file access?

Willy.

"Phil S" <ph*********@hansen.NOSPAM.com> wrote in message
news:Os**************@TK2MSFTNGP09.phx.gbl...
When opening a file in two different threads at the same time, it will cause an exception if the FileShare modes are incompatible with the FileAccess
modes.

Is there some way to test whether access will be allowed to the file without having to try opening it and get an exception?

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Peter Hansen | last post by:
The term "mock filesystem" refers to code allowing unit or acceptance tests to create, read and write, and manipulate in other ways "virtual" files, without any actual disk access. Everything is...
0
by: Jonathan Allen | last post by:
We have found that our method of testing does not match traditional text-book methodologies. I decided to write a short white paper on it so that I could get your opinions. Does anyone else use...
2
by: RichDef | last post by:
Hello everyone! I have been running some tests of a component that simply returns an image path based upon some logic and a simple select statement to an Access db. The component had to be...
3
by: SnaiL | last post by:
Hi, guys. I am interested in C++ unit testing. I know only two methods how to test private class methods. 1) Declare friend class in the code. But I don't like this style because tests depends...
0
by: Todd D. Levy | last post by:
IF I have a database developed in the following environment: Windows XP Professional (all security patches and critical fixes installed) Office XP Professional (Access 2000 file format in Access...
8
by: Michael van der Veeke | last post by:
Hi All, Does anyone use any regression testing tools with MS Access? We have tried a few and none seem to work very well with a MS Access Front end and I need one. Can anyone provide any...
15
by: Enrique | last post by:
Question I am posting this question again (3rd time) because some issues with my no spam alias. Here it is the question: I have not been able to run unit tests for a VSTO (2005) project. I...
18
by: Andrew Wan | last post by:
I have been developing web applications with ASP & Javascript for a long time. I have been using Visual Studio 2003.NET. While VS2003 is okay for intellisense of ASP & Javascript, it's still not...
0
by: Matthew Fitzgibbons | last post by:
I'm by no means a testing expert, but I'll take a crack at it. Casey McGinty wrote: I've never run into this. Rule of thumb: always separate software from hardware. Write mock classes or...
21
by: =?ISO-8859-1?Q?Fad=A5?= | last post by:
Hello guys, I want to do kinda of an A/B split testing on a website I run. I just created a new version but I need to keep both version running and see which one will perform better. First, I'm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.