WyldGynjer
MIS
I'm trying to use a file that is used by another program to determine a user's rights to certain databases. When I try to open the file using the following line:
objStreamReader = New StreamReader("\\networkdrive\filename.dat", FileAccess.Read)
I get the following error when running the program:
An unhandled exception of type 'System.IO.IOException' occured in mscorlib.dll. Additional Information: the process cannot access the file "filename" because it's being used by another process.
I looked up this error on microsoft's page - and found that this is an error in xmlvalidatingreader class - but I don't think I'm using that....
When I move the file or make a copy of the file - I don't have a problem opening it. So the file itself is not corrupt - I'm just having problems openeing it if it's being used by something else - is there a way to get around this?
Thanks!!
objStreamReader = New StreamReader("\\networkdrive\filename.dat", FileAccess.Read)
I get the following error when running the program:
An unhandled exception of type 'System.IO.IOException' occured in mscorlib.dll. Additional Information: the process cannot access the file "filename" because it's being used by another process.
I looked up this error on microsoft's page - and found that this is an error in xmlvalidatingreader class - but I don't think I'm using that....
When I move the file or make a copy of the file - I don't have a problem opening it. So the file itself is not corrupt - I'm just having problems openeing it if it's being used by something else - is there a way to get around this?
Thanks!!