Home All Groups Group Topic Archive Search About
Author
14 Apr 2006 10:29 AM
Johnny E Jensen
Hello

I have made a tool in VB6 to track users logging into our RAS Server.
The tool opens the logfiles made by the RAS Server. To read the logfile i
use scripting textstream. It works fine.

Now I want to make the same tool in VB.NET using System.IO.StreamReader or
the FileStream. I get the error : Can't Open File - because it is being used
by another process.? How can i open that file in vb.net?

Kind regards
Johnny E Jensen

Author
14 Apr 2006 8:38 PM
vbnetdev
Try This

fs = File.Open(FILE_NAME, FileMode.Open, FileAccess.Read, FileShare.Read)


--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



Show quoteHide quote
"Johnny E Jensen" <j**@winner-crm.dk> wrote in message
news:%239xVG36XGHA.1192@TK2MSFTNGP03.phx.gbl...
> Hello
>
> I have made a tool in VB6 to track users logging into our RAS Server.
> The tool opens the logfiles made by the RAS Server. To read the logfile i
> use scripting textstream. It works fine.
>
> Now I want to make the same tool in VB.NET using System.IO.StreamReader or
> the FileStream. I get the error : Can't Open File - because it is being
> used by another process.? How can i open that file in vb.net?
>
> Kind regards
> Johnny E Jensen
>
Author
16 Apr 2006 9:35 PM
Johnny E Jensen
Hello
Sorry to say, that has been tryed, with no luck.

Any one else??

Show quoteHide quote
"vbnetdev" <vbnetdev@community.nospam> wrote in message
news:eV0yaNAYGHA.3604@TK2MSFTNGP02.phx.gbl...
> Try This
>
> fs = File.Open(FILE_NAME, FileMode.Open, FileAccess.Read, FileShare.Read)
>
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> "Johnny E Jensen" <j**@winner-crm.dk> wrote in message
> news:%239xVG36XGHA.1192@TK2MSFTNGP03.phx.gbl...
>> Hello
>>
>> I have made a tool in VB6 to track users logging into our RAS Server.
>> The tool opens the logfiles made by the RAS Server. To read the logfile i
>> use scripting textstream. It works fine.
>>
>> Now I want to make the same tool in VB.NET using System.IO.StreamReader
>> or the FileStream. I get the error : Can't Open File - because it is
>> being used by another process.? How can i open that file in vb.net?
>>
>> Kind regards
>> Johnny E Jensen
>>
>
>