Click here to Skip to main content
15,924,038 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: comparing values on fields in arraylists Pin
Stephen McGuire3-Aug-06 7:22
Stephen McGuire3-Aug-06 7:22 
GeneralRe: comparing values on fields in arraylists Pin
ssbelfast3-Aug-06 7:58
ssbelfast3-Aug-06 7:58 
GeneralRe: comparing values on fields in arraylists Pin
Stephen McGuire3-Aug-06 11:47
Stephen McGuire3-Aug-06 11:47 
AnswerRe: comparing values on fields in arraylists [modified] Pin
Nouvand3-Aug-06 1:40
Nouvand3-Aug-06 1:40 
GeneralRe: comparing values on fields in arraylists Pin
ssbelfast3-Aug-06 2:57
ssbelfast3-Aug-06 2:57 
GeneralRe: comparing values on fields in arraylists Pin
Nouvand3-Aug-06 22:30
Nouvand3-Aug-06 22:30 
AnswerRe: comparing values on fields in arraylists [modified] Pin
Nouvand3-Aug-06 22:53
Nouvand3-Aug-06 22:53 
QuestionIf Else Loop With Date Format in VB.NET Pin
Tram881-Aug-06 15:29
Tram881-Aug-06 15:29 
I know this is very simple to you, but I could not debug the problem. I am writting a program to read everyline of a textfile. If the line has date as my format and an "Error" string, then it must go to the IF/THEN ELSE loop. But in fact, it can go to the IF/THEN ELSE loop even one of the condition is met. If I run my code today which is 8/1/2006, I expect to see is "8/1/2006 4:01:14 Error", but in fact, the result is 2 lines "7/1/2006 4:01:14 Error" and "8/1/2006 4:01:14 Error"
Would you please help me out. I would appreciate your big helps very much. Below is my text and code.

Tram88
This is the content of text file:-----------------------------------------------------------------
7/1/2006 4:01:14 Error
8/1/2006 4:01:14 Error


This is the VB.NET code:---------------------------------------------------------------------------
Dim eoFile As System.IO.File<br />
Dim eoRead As System.IO.StreamReader<br />
Dim ebStart As Boolean<br />
Dim eStart As String = Format(Today, "M" & "/" & "d" & "/" & "yyyy")<br />
Dim eEnd As String = "email notification started"<br />
eoRead = eoFile.OpenText(strFileEmailNotification) 'opens text file for reading<br />
Dim Pass As Integer = 0<br />
Dim eIntotalCount As Integer<br />
  While eoRead.Peek <> -1   'reads until peek is -1, which is end of file<br />
       Dim eLineOut = eoRead.ReadLine<br />
       Dim estringtext As String = "Error" <br />
       Dim eiLine As Integer<br />
       <br />
       If (InStr(1, eLineOut, estringtext, CompareMethod.Text)) And (InStr(1, eLineOut, eStart, CompareMethod.Text)) Then<br />
          intTotalCount = CountStringInFile(strFileEmailNotification, estringtext)<br />
          Pass = 1<br />
       End If<br />
  End While

AnswerRe: If Else Loop With Date Format in VB.NET Pin
Steve Pullan1-Aug-06 16:13
Steve Pullan1-Aug-06 16:13 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Tram882-Aug-06 4:21
Tram882-Aug-06 4:21 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Steve Pullan2-Aug-06 4:38
Steve Pullan2-Aug-06 4:38 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Steve Pullan2-Aug-06 4:46
Steve Pullan2-Aug-06 4:46 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Tram882-Aug-06 5:18
Tram882-Aug-06 5:18 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Steve Pullan2-Aug-06 13:47
Steve Pullan2-Aug-06 13:47 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Tram883-Aug-06 4:19
Tram883-Aug-06 4:19 
Questiondatabase connection to listbox in vb.net Pin
rnr7861-Aug-06 11:38
rnr7861-Aug-06 11:38 
QuestionProblem reading text file Pin
Jawa20061-Aug-06 5:31
Jawa20061-Aug-06 5:31 
AnswerRe: Problem reading text file Pin
Dave Kreskowiak1-Aug-06 5:44
mveDave Kreskowiak1-Aug-06 5:44 
QuestionChecking for characters - such as . or \ Pin
ciscokid551-Aug-06 5:09
ciscokid551-Aug-06 5:09 
AnswerRe: Checking for characters - such as . or \ Pin
Dave Kreskowiak1-Aug-06 5:47
mveDave Kreskowiak1-Aug-06 5:47 
GeneralRe: Checking for characters - such as . or \ Pin
ciscokid551-Aug-06 6:55
ciscokid551-Aug-06 6:55 
GeneralRe: Checking for characters - such as . or \ Pin
ciscokid551-Aug-06 7:40
ciscokid551-Aug-06 7:40 
QuestionSpecial Charecter Pin
Sinchan Nikam1-Aug-06 3:46
Sinchan Nikam1-Aug-06 3:46 
AnswerRe: Special Charecter [modified] Pin
Dave Kreskowiak1-Aug-06 4:20
mveDave Kreskowiak1-Aug-06 4:20 
QuestionHelp with Session Pin
alexfromto1-Aug-06 3:11
alexfromto1-Aug-06 3:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.