Click here to Skip to main content
15,920,646 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
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 
Tram88 wrote:
Based on your code, I do have a question for intTotalCount = CountStringInFile(strFileEmailNotification, estringtext)
If I run the code, I would like to see intTotalCount=1 . In fact, it is 2. Can you teach me how to program it.


The CountStringInFile() function is not a standard VB function call. I presume you have obtained this code from somewhere else?

If it does what its name implies, then it will scan the entire file for any occurrences of the search string - in this particular case with the data you have already supplied in your first post, there are two lines which contain "Error" therefore the return value will be 2.

What I think you need to do is to change this line:
intTotalCount = CountStringInFile(strFileEmailNotification, estringtext)
to
eIntotalCount = eIntotalCount + 1

since intTotalCount does not seem to be declared anywhere and eIntotalCount is declared but not used. [Was this intentional?]

When your code exits, eIntotalCount will now contain the count of the number of lines in your file that have both the error string AND the date string for which you are searching.

...Steve

1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life."
I read that somewhere once Smile | :)

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 
AnswerRe: Help with Session Pin
Dave Kreskowiak1-Aug-06 4:26
mveDave Kreskowiak1-Aug-06 4:26 
GeneralRe: Help with Session Pin
alexfromto1-Aug-06 4:49
alexfromto1-Aug-06 4:49 
GeneralRe: Help with Session Pin
Dave Kreskowiak1-Aug-06 5:08
mveDave Kreskowiak1-Aug-06 5:08 
GeneralRe: Help with Session Pin
alexfromto1-Aug-06 5:17
alexfromto1-Aug-06 5:17 
GeneralRe: Help with Session Pin
Dave Kreskowiak1-Aug-06 5:38
mveDave Kreskowiak1-Aug-06 5:38 
GeneralRe: Help with Session Pin
alexfromto1-Aug-06 6:48
alexfromto1-Aug-06 6:48 

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.