Click here to Skip to main content
15,914,481 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to Download File and Upload in Datagridview VB.NET Pin
Mitsunari Ishida30-Jan-17 15:18
Mitsunari Ishida30-Jan-17 15:18 
AnswerRe: How to Download File and Upload in Datagridview VB.NET Pin
Richard MacCutchan30-Jan-17 22:20
mveRichard MacCutchan30-Jan-17 22:20 
AnswerRe: How to Download File and Upload in Datagridview VB.NET Pin
Simon_Whale30-Jan-17 23:16
Simon_Whale30-Jan-17 23:16 
QuestionLinq, I get an extra blank record on GroupBy, How to select it out Pin
jkirkerx27-Jan-17 12:04
professionaljkirkerx27-Jan-17 12:04 
AnswerRe: Linq, I get an extra blank record on GroupBy, How to select it out Pin
Richard Deeming28-Jan-17 2:58
mveRichard Deeming28-Jan-17 2:58 
GeneralRe: Linq, I get an extra blank record on GroupBy, How to select it out Pin
jkirkerx30-Jan-17 7:13
professionaljkirkerx30-Jan-17 7:13 
Questionbindingsource.filter not working Pin
Member 1108983127-Jan-17 1:03
Member 1108983127-Jan-17 1:03 
AnswerRe: bindingsource.filter not working Pin
Eddy Vluggen27-Jan-17 1:15
professionalEddy Vluggen27-Jan-17 1:15 
GeneralRe: bindingsource.filter not working Pin
Member 1108983127-Jan-17 4:26
Member 1108983127-Jan-17 4:26 
AnswerRe: bindingsource.filter not working Pin
Richard Deeming27-Jan-17 2:07
mveRichard Deeming27-Jan-17 2:07 
GeneralRe: bindingsource.filter not working Pin
Member 1108983127-Jan-17 4:23
Member 1108983127-Jan-17 4:23 
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 

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.