D
damezumari
I am running a vbnet web application
http://localhost/passwords/passwords.aspx on windows 2000 where a text
file is read into a temporary datatable called Table1.
Here is the problematic part of my code:
Dim sr As StreamReader = New StreamReader(Filename)
Dim line As String
Do
line = sr.ReadLine()
Dim words() As String = Split(line, ",")
Row1 = Table1.NewRow()
Row1.Item("Email") = Mid(words(0), 2, Len(words(0)) -
2)
Row1.Item("Password") = Mid(words(1), 2, Len(words(1))
- 2)
Table1.Rows.Add(Row1)
Loop Until line Is Nothing
sr.Close()
A typical Filename could be C:\Inetpub\wwwroot\passwords\passwords.txt.
The problem is that after I run the program, I am not able to write
over the text file. The error message is: "There has been a sharing
violation. The source or destination file may be in use."
I do close the StreamReader with sr.Close, so what else do I have to
do?
http://localhost/passwords/passwords.aspx on windows 2000 where a text
file is read into a temporary datatable called Table1.
Here is the problematic part of my code:
Dim sr As StreamReader = New StreamReader(Filename)
Dim line As String
Do
line = sr.ReadLine()
Dim words() As String = Split(line, ",")
Row1 = Table1.NewRow()
Row1.Item("Email") = Mid(words(0), 2, Len(words(0)) -
2)
Row1.Item("Password") = Mid(words(1), 2, Len(words(1))
- 2)
Table1.Rows.Add(Row1)
Loop Until line Is Nothing
sr.Close()
A typical Filename could be C:\Inetpub\wwwroot\passwords\passwords.txt.
The problem is that after I run the program, I am not able to write
over the text file. The error message is: "There has been a sharing
violation. The source or destination file may be in use."
I do close the StreamReader with sr.Close, so what else do I have to
do?