Click here to Skip to main content
15,883,829 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: bindingsource.filter not working Pin
Richard Deeming27-Jan-17 4:26
mveRichard Deeming27-Jan-17 4:26 
GeneralRe: bindingsource.filter not working Pin
Member 1108983127-Jan-17 7:20
Member 1108983127-Jan-17 7:20 
GeneralRe: bindingsource.filter not working Pin
Richard Deeming27-Jan-17 7:37
mveRichard Deeming27-Jan-17 7:37 
QuestionHow to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Member 1186689324-Jan-17 5:29
Member 1186689324-Jan-17 5:29 
AnswerRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Richard Deeming24-Jan-17 6:02
mveRichard Deeming24-Jan-17 6:02 
GeneralRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Member 1186689324-Jan-17 8:13
Member 1186689324-Jan-17 8:13 
GeneralRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Richard MacCutchan24-Jan-17 8:38
mveRichard MacCutchan24-Jan-17 8:38 
GeneralRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Member 1186689324-Jan-17 9:07
Member 1186689324-Jan-17 9:07 
Thanks for the response. You're suggestion helped but the if then statement still doesn't work. Also, Sites data never changes each computer at each site has a Sites data file with the appropriate entry. It only has one line in the file and it is formatted like this: BEC,BEC. Here is the new code:

VB
Do
                line = sr.ReadLine()
                Console.WriteLine("line = " & line)
                Console.WriteLine("Start processing loop")
                If line IsNot Nothing Then
                    arrStr = Split(line, ",")
                    siteArr = Split(Sites, ",")
                    Site1 = siteArr(0)
                    If arrStr.Length >= 3 Then
                        strSiteCode = arrStr(0)
                        strVistaFQDN = arrStr(1)
                        strPort = arrStr(2)
                        Console.WriteLine(Trim(Site1) & " , " & Trim(strSiteCode))
                        Console.WriteLine("s=" & strVistaFQDN & " p=" & strPort)
                        Console.WriteLine("Array populated...  Enter if then statement")
                        If Trim(Sites) = Trim(strSiteCode) Then
                            'Console.WriteLine(Trim(Sites) & " , " & Trim(strSiteCode))
                            'Console.WriteLine("s=" & strVistaFQDN & " p=" & strPort)
                            Console.WriteLine("Successfully processed!")
                            Exit Do
                        Else
                            Console.WriteLine("Error:  No Matching Information in the Sitecode and R03sites files!")
                        End If
                    End If
                End If
            Loop Until line Is Nothing


Here is the output:

\Dell>bcmass
line = BEC,test.beckley.com,19233
Start processing loop
BEC , BEC
s=test.beckley.com p=19233
Array populated... Enter if then statement
Error: No Matching Information in the Sitecode and R03sites files!
line = BIR,test.birmingham.com,19230
Start processing loop
BEC , BIR
s=test.birmingham.com p=19230
Array populated... Enter if then statement
Error: No Matching Information in the Sitecode and R03sites files!
line =
Start processing loop
GeneralRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Richard MacCutchan24-Jan-17 9:37
mveRichard MacCutchan24-Jan-17 9:37 
GeneralRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Member 1186689324-Jan-17 10:03
Member 1186689324-Jan-17 10:03 
PraiseRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Member 1186689325-Jan-17 5:42
Member 1186689325-Jan-17 5:42 
GeneralRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Richard MacCutchan25-Jan-17 5:57
mveRichard MacCutchan25-Jan-17 5:57 
GeneralRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Member 1186689324-Jan-17 9:11
Member 1186689324-Jan-17 9:11 
GeneralRe: How to compare 2 different text file lines and then process information if a match is in both file lines - Please help Pin
Eddy Vluggen25-Jan-17 6:21
professionalEddy Vluggen25-Jan-17 6:21 
QuestionHow to download all latest files from ftp server to pc automatically in vb.net Pin
Member 1295777522-Jan-17 15:38
Member 1295777522-Jan-17 15:38 
AnswerRe: How to download all latest files from ftp server to pc automatically in vb.net Pin
Michael_Davies22-Jan-17 20:43
Michael_Davies22-Jan-17 20:43 
GeneralRe: How to download all latest files from ftp server to pc automatically in vb.net Pin
Member 1295777522-Jan-17 21:09
Member 1295777522-Jan-17 21:09 
GeneralRe: How to download all latest files from ftp server to pc automatically in vb.net Pin
NotPolitcallyCorrect23-Jan-17 2:20
NotPolitcallyCorrect23-Jan-17 2:20 
QuestionHow to download all latest files from ftp server to pc automatically in vb.net Pin
Member 1295777522-Jan-17 15:07
Member 1295777522-Jan-17 15:07 
QuestionIsolating text within a text box Pin
Member 1296154621-Jan-17 13:27
Member 1296154621-Jan-17 13:27 
AnswerRe: Isolating text within a text box Pin
NotPolitcallyCorrect21-Jan-17 15:13
NotPolitcallyCorrect21-Jan-17 15:13 
Questionvb.net 2010 code check if values exist Pin
dcof19-Jan-17 12:00
dcof19-Jan-17 12:00 
AnswerRe: vb.net 2010 code check if values exist Pin
NotPolitcallyCorrect19-Jan-17 13:38
NotPolitcallyCorrect19-Jan-17 13:38 
AnswerRe: vb.net 2010 code check if values exist Pin
Richard Deeming20-Jan-17 2:04
mveRichard Deeming20-Jan-17 2:04 
Questionvb.net menu strip Pin
Member 1295543917-Jan-17 19:32
Member 1295543917-Jan-17 19:32 

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.