Click here to Skip to main content
15,881,690 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: DataView Sort Pin
jkirkerx17-Sep-20 11:28
professionaljkirkerx17-Sep-20 11:28 
SuggestionRe: DataView Sort Pin
Richard Deeming17-Sep-20 21:36
mveRichard Deeming17-Sep-20 21:36 
GeneralRe: DataView Sort Pin
jkirkerx18-Sep-20 7:56
professionaljkirkerx18-Sep-20 7:56 
GeneralRe: DataView Sort Pin
jkirkerx18-Sep-20 8:00
professionaljkirkerx18-Sep-20 8:00 
GeneralRe: DataView Sort Pin
Gerry Schmitz18-Sep-20 8:10
mveGerry Schmitz18-Sep-20 8:10 
GeneralRe: DataView Sort Pin
Richard Deeming20-Sep-20 23:38
mveRichard Deeming20-Sep-20 23:38 
GeneralRe: DataView Sort Pin
jkirkerx21-Sep-20 6:07
professionaljkirkerx21-Sep-20 6:07 
QuestionRun multiple SSH commands without disconnecting Pin
droidman16-Sep-20 1:56
droidman16-Sep-20 1:56 
I'm using this example from ChilKat, using his dll to connect to a server by ssh. it works perfectly the problem is that i want to run a list of commands from a textbox
VB.NET SSH Remote Shell Multiple Commands[^]

So i have a textbox with some monitoring commands:

<pre>  For x = 0 To MonitorCommandsToRun.Lines.Count - 1

                ' Open a session channel.  (It is possible to have multiple
                ' session channels open simultaneously.)
                channelNum = ssh.OpenSessionChannel()
                If (channelNum < 0) Then
                    output.AppendText(ssh.LastErrorText & vbNewLine)
                    Exit Sub
                End If
                success = ssh.SendReqShell(channelNum)
                If (success <> True) Then
                    output.AppendText(ssh.LastErrorText & vbNewLine)
                    Exit Sub
                End If

                success = ssh.ChannelSendString(channelNum, MonitorCommandsToRun.Lines(x).ToString & vbCrLf, "ansi")
                If (success <> True) Then
                    output.AppendText(ssh.LastErrorText & vbNewLine)
                    Exit Sub
                End If


                ' Retrieve and display the output.
                success = ssh.ChannelReceiveUntilMatch(channelNum, myPrompt, "ansi", True)
                If (success <> True) Then
                    output.AppendText(ssh.LastErrorText & vbNewLine)
                    Exit Sub
                End If


                cmdOutput = ssh.GetReceivedText(channelNum, "ansi")
                If (ssh.LastMethodSuccess <> True) Then
                    output.AppendText(ssh.LastErrorText & vbNewLine)
                    Exit Sub
                End If

                success = ssh.ChannelSendEof(channelNum)
                If (success <> True) Then
                    output.AppendText(ssh.LastErrorText & vbNewLine)
                    Exit Sub
                End If

                n = ssh.ChannelReadAndPoll(channelNum, pollTimeoutMs)
                If (n < 0) Then
                    output.AppendText(ssh.LastErrorText & vbNewLine)
                    Exit Sub
                End If

                ' Close the channel:
                success = ssh.ChannelSendClose(channelNum)
                If (success <> True) Then
                    output.AppendText(ssh.LastErrorText & vbNewLine)
                    Exit Sub
                End If

                output.AppendText(cmdOutput & vbNewLine)
            Next


this looks ugly and the program hangs, not sure if i need to remove the channelNum check or avoid closing it but i just want it to resume doing one command per line.

My entire code is like chilkat's with this for inside it.

thanks in advance
Questioni have tried the code above . it works fine. but it only shows the breakdown of the costs. i want the label to show the total cost as well. what more should i add to the code?? please help</pre> Pin
Rikansha kumar10-Sep-20 22:10
Rikansha kumar10-Sep-20 22:10 
Rant[REPOST]: i have tried the code above . it works fine. but it only shows the breakdown of the costs. i want the label to show the total cost as well. what more should i add to the code?? please help</pre> Pin
Richard Deeming10-Sep-20 22:22
mveRichard Deeming10-Sep-20 22:22 
QuestionVB6 Pin
Devam Dani28-Aug-20 16:26
Devam Dani28-Aug-20 16:26 
AnswerRe: VB6 Pin
Dave Kreskowiak28-Aug-20 18:49
mveDave Kreskowiak28-Aug-20 18:49 
AnswerRe: VB6 Pin
CHill607-Sep-20 4:18
mveCHill607-Sep-20 4:18 
AnswerRe: VB6 Pin
Eddy Vluggen8-Sep-20 10:42
professionalEddy Vluggen8-Sep-20 10:42 
GeneralRe: VB6 Pin
CHill609-Sep-20 22:57
mveCHill609-Sep-20 22:57 
GeneralRe: VB6 Pin
Eddy Vluggen10-Sep-20 12:41
professionalEddy Vluggen10-Sep-20 12:41 
QuestionWhy Data Visualization is important? Pin
Member 1492367226-Aug-20 7:54
Member 1492367226-Aug-20 7:54 
AnswerRe: Why Data Visualization is important? Pin
Dave Kreskowiak26-Aug-20 10:51
mveDave Kreskowiak26-Aug-20 10:51 
QuestionLoop DataTable per assegnare valori alle rows non ci riesco Pin
Fabrizio Leoncini21-Aug-20 0:33
Fabrizio Leoncini21-Aug-20 0:33 
AnswerRe: Loop DataTable per assegnare valori alle rows non ci riesco Pin
Dave Kreskowiak21-Aug-20 6:28
mveDave Kreskowiak21-Aug-20 6:28 
GeneralRe: Loop DataTable per assegnare valori alle rows non ci riesco Pin
Fabrizio Leoncini21-Aug-20 21:31
Fabrizio Leoncini21-Aug-20 21:31 
GeneralRe: Loop DataTable per assegnare valori alle rows non ci riesco Pin
Eddy Vluggen22-Aug-20 10:01
professionalEddy Vluggen22-Aug-20 10:01 
GeneralRe: Loop DataTable per assegnare valori alle rows non ci riesco Pin
CHill6025-Aug-20 2:17
mveCHill6025-Aug-20 2:17 
GeneralRe: Loop DataTable per assegnare valori alle rows non ci riesco Pin
Eddy Vluggen25-Aug-20 15:19
professionalEddy Vluggen25-Aug-20 15:19 
QuestionExcel vba creating a timer through doevents Pin
Mat 25720-Aug-20 3:42
Mat 25720-Aug-20 3:42 

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.