Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

StreamReader Problem on Publishing App 1

Status
Not open for further replies.

dataman86

Technical User
Oct 11, 2008
104
US
I get an error message saying file not found when I try to publish my app.

Coding:

Dim Sr As New StreamReader("Test.txt")
Dim sLine31 As String = " "
Dim SLine34 As String = " "
Dim sLine35 As String = " "
Dim SLine40 As String = " "
Dim SLine25 As String = " "
Dim SLine22 As String = " "
Dim SLine14 As String = " "
Dim SLine57 As String = " "
Dim SLine50 As String = " "
Dim SLine36 As String = " "
Dim TCreditTextBox1 As String
Dim TDebitTextBox1 As String
Dim UCreditTextBox1 As String
Dim UDebitTextBox1 As String
Dim VDebitTextBox1 As String
Dim VCreditTextBox1 As String
Dim WCreditTextBox1 As String
Dim WDebitTextBox1 As String
Dim XCreditTextBox1 As String
Dim XDebitTextBox1 As String
Dim DebitDocTotal As String
Dim CreditDocTotal As String
Dim ZCreditTextBox1 As String
Dim ZDebitTextBox1 As String
Dim AACreditTextBox1 As String
Dim AADebitTextBox1 As String
Dim BBCreditTextBox1 As String
Dim BBDebitTextBox1 As String
Dim CCCreditTextBox1 As String
Dim CCDebitTextBox1 As String
Dim DDCreditTextBox1 As String
Dim DDDebitTextBox1 As String
Dim EECreditTextBox1 As String
Dim EEDebitTextBox1 As String
Dim FFCreditTextBox1 As String
Dim FFDebitTextBox1 As String
Dim Line As String
Dim LineValues() As String
Dim Contents As New ArrayList
Dim Finished As Boolean = False
While Not Finished
Line = Sr.ReadLine()
If Line Is Nothing Then
Finished = True
Else
LineValues = Split(Line, ",")
Contents.Add(LineValues)
End If
End While
Dim sw As New StreamWriter("JVFile.txt")
Dim Counter As Integer
For Counter = 0 To Contents.Count() - 1
LineValues = CType(Contents(Counter), String())

The app works fine until I publish, then it will not work.
The Test.txt is not found. I have it stored in the Bin\Debug and is just Test which is a file with one character in the first position. The Chracter a ","

Any suggestions on how to redefine the StreamReader so the problem can be solved.

DataMan86
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top