473,396 Members | 1,707 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,396 software developers and data experts.

File Access Error

Just a couple of general questions about errors related to accessing drives.

I seem to remember in VB6 there were a list of error numbers you could test
for when you attempted to access a drive, such as "Drive not ready". In
VB.Net do I have to test for the specific text or is there a list of these
error code and meanings?

When I look of the method Directory.GetDirectories(myPath), I see nothing
right there for the type of exceptions which can be generated by this method.
How do I find the list of all the exceptions "types" ( catch es
"exceptionType") that this method can generate or can be generated as a result
of running this method?

Thanks in advance for your assistance!!!!!!!!!

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 20 '05 #1
2 2243
Hello,

"Jim Heavey" <Ji*******@hotmail.com> schrieb:
I seem to remember in VB6 there were a list of error numbers you could test for when you attempted to access a drive, such as "Drive not ready". In
VB.Net do I have to test for the specific text or is there a list of these
error code and meanings?
You will find a list of exceptions which can be thrown by the method in the
documentation:

http://msdn.microsoft.com/library/en...riestopic1.asp
When I look of the method Directory.GetDirectories(myPath),
I see nothing right there for the type of exceptions which can be
generated by this method.


Walkthrough: Structured Exception Handling
http://msdn.microsoft.com/library/en...onhandling.asp

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
"Jim Heavey" <Ji*******@hotmail.com> schrieb
Just a couple of general questions about errors related to accessing
drives.

I seem to remember in VB6 there were a list of error numbers you
could test for when you attempted to access a drive, such as "Drive
not ready". In VB.Net do I have to test for the specific text or is
there a list of these error code and meanings?

When I look of the method Directory.GetDirectories(myPath), I see
nothing right there for the type of exceptions which can be generated
by this method. How do I find the list of all the exceptions "types"
( catch es "exceptionType") that this method can generate or can be
generated as a result of running this method?

Thanks in advance for your assistance!!!!!!!!!


My docs (<F1>) for Directory.GetDirectories lists
- UnauthorizedAccessException
- ArgumentException
- ArgumentNullException
- PathTooLongException
- IOException
- DirectoryNotFoundException

In general, it can happen that (unfortunatelly) not all exceptions are
listed. Can't remember which one, but must have been some within several
thousands.
--
Armin

Nov 20 '05 #3

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

Similar topics

5
by: simon place | last post by:
is the code below meant to produce rubbish?, i had expected an exception. f=file('readme.txt','w') f.write(' ') f.read() ( PythonWin 2.3 (#46, Jul 29 2003, 18:54:32) on win32. ) I got...
0
by: Bill Burwell | last post by:
I am converting a VB6 WebClass application to VB.Net. Used the VB upgrade tool to do the conversion - and it left me a lot of little code things to do. Did those code things and got my app to...
5
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
7
by: Mark | last post by:
Hello, I have researched and tried every thing I have found on the web, in groups and MS KB articles. Here is what I have. I have a Windows 2000 Domain Controller all service packs and...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
1
by: Duffman | last post by:
Hi, I have what seems to be a common problem, but the solutions I've found don't seem to work. I would like to use a web service to create a file at a UNC location in a shared file. Currently...
1
by: igotyourdotnet | last post by:
Ok, here is the issue: I have 2 web pages one does a file upload to a database and the other page does a FTP to a server, both pages use the c:\temp directory. The page that uploads to a database...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.