By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,453 Members | 932 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,453 IT Pros & Developers. It's quick & easy.

Path/File Access Error (75)

P: n/a
LP
If you can't seem to eliminate throwing this exception, then the answer is to
look for a different file opened previously with an invalid or missing
filename. For example, assume the following code:

Dim FileName15, FileName16 As String

Filename15 = "mytextfile.txt"

Fileopen(15, FileName15, Mode.Output)
Fileopen(16, FileName16, Mode.Output)

Print(15,...)

Even though we are only writing to unit 15 (which has a valid file name),
the exception nevertheless gets thrown because the filename for 16 was never
defined. This means that you will get "Path/File access error" messages
when writing to file with valid filenames when the true problem is because
there is a filename problem with another file that was opened.

In short, when it seems impossible to locate the source of this error
message, you must search above the line where the error is being thrown and
look for a file that was opened that did not have a valid file name.
Examples of invalid files names are:

1. Never initializing a filename (i.e., Dim filename as string)
2. Illegal character usage in filename string, for example: c:\\myfile.txt
3. Not using the string type for filenames (i.e., Dim filename as Integer)

LP
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"LP" <LP@discussions.microsoft.com> schrieb:
[...]


Is this a question or a reply to a question?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.