Greetings All,
I have established a working Remote Connection to a MySQL DB using ODBC which allows me to select data in a Datagridview in my Form. The data is a list of IP addresses. What i want to do is take each IP address, parse it to My.Computer.Network.Ping if the result returns false then the IP address is diaplayed in a TextBox1. If the result is true then the IP address is either disgarded or displayed in another TextBox field.
Fairly simple IF ELSE statement which i think needs to be used in conjunction with a DO WHILE loop.
Due to thier being numerous IP addresses to Ping the loop would be placed in a seperate thread and the actual Ping arguements altered accordingly (timeout etc)
I think with this i need some direction is the best way to get started,
Any thoughts?
Thanks in advance as always,
Sy
5 2302
It seems like you have the right idea. (A seperate thread of sorts would be needed to keep things moving along)
You have the IP addresses.
You have the PING section available to you.
You know what to do for successfull pings and unsuccessfull pings
Just give it a shot and see what comes out.
I might suggest that use a "pool" of some number of threads, and some mechanism to feed them IP addresses as needed. But that is a bit overly complex at this point I thjink.
It seems like you have the right idea. (A seperate thread of sorts would be needed to keep things moving along)
You have the IP addresses.
You have the PING section available to you.
You know what to do for successfull pings and unsuccessfull pings
Just give it a shot and see what comes out.
I might suggest that use a "pool" of some number of threads, and some mechanism to feed them IP addresses as needed. But that is a bit overly complex at this point I thjink.
Hi Plater,
yea im giving it a go as we speak. I think the issue at the moment is extracting the IP Addresses from the Datagridview to parse to the Network.Ping.
Anyway ill crack on! Any suggestions though feel free! :P
Sy
Hi Plater,
yea im giving it a go as we speak. I think the issue at the moment is extracting the IP Addresses from the Datagridview to parse to the Network.Ping.
Anyway ill crack on! Any suggestions though feel free! :P
Sy
Hello All,
Ive been able to extract the IP Addresses from my data set and parse them to an array which in turn parses them to the Network.Ping method running in a WHILE loop in a seprate thread. Ive then pointed the the results from the Network.Ping method (True/False) displaying the IP address if returning False in a textbox field. However all i want to do is simply return line each time an IP address is parsed to a textbox field. Ive looked into using a list box but cannot get the IP addresses to be shown as its "items" -
Dim resultip As String
-
IpResListBox1.Items.IsReadOnly = resultip
-
Above this throws the error 'IsReadonly' -
Dim resultip As String
-
Pingable_Results_IP_TextBox1.Text = resultip
-
Above returns the IP Address meeting the Ping arguement however doesnt return line and instead replaces the first IP Address with the second.
Any Thoughts? (Its so simple i know...ive had a bad week...if not a usual week)
Sy
Hello All,
Ive been able to extract the IP Addresses from my data set and parse them to an array which in turn parses them to the Network.Ping method running in a WHILE loop in a seprate thread. Ive then pointed the the results from the Network.Ping method (True/False) displaying the IP address if returning False in a textbox field. However all i want to do is simply return line each time an IP address is parsed to a textbox field. Ive looked into using a list box but cannot get the IP addresses to be shown as its "items" -
Dim resultip As String
-
IpResListBox1.Items.IsReadOnly = resultip
-
Above this throws the error 'IsReadonly' -
Dim resultip As String
-
Pingable_Results_IP_TextBox1.Text = resultip
-
Above returns the IP Address meeting the Ping arguement however doesnt return line and instead replaces the first IP Address with the second.
Any Thoughts? (Its so simple i know...ive had a bad week...if not a usual week)
Sy
Set your textbox to multiline. The textbox can now be populated as an array of string - check out the example below: - Dim MyStrings() As String = New String() {"Line1", "Line2", "Line3", "Line4"}
-
TextBox1.Lines = MyStrings
The other way is a listbox...you can't just set the listbox to show the items in that fashion.
For instance - Dim MyList As List(Of Item)
-
ListBox1.Items = MyList
won't work...and will result in your readonly error.
However: - For Each sItem As String in MyList
-
ListBox1.Items.Add oItem
-
Next
will work just fine.
You could use DataGridView and use your DataSet as the DataSource.
Then cycle through your DataTable (instead of pushing them to another array) and just update a 2nd column about if it could ping the address or not.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Paul Wagstaff |
last post by:
Hi there folks,
Within Access 97,
Can anyone tell me the proper way to 'ping' a workstation on a NT 4 network
and/or gather data such as the IP adress. Currently I have code and use...
|
by: Ciro |
last post by:
Hi Guys, I'm developing an application that sends ICMP echo requests (ping)
via the .net Ping Class. I've some informations related to the network such
as IP addresses,Urls,SiteNames and so stored...
|
by: Tom |
last post by:
I need my data generating C program on computer #1 to export small
amounts of data (one - 40 byte data structure) periodically (once per
minute) to a C program on computer #2.
I am considering...
|
by: =?Utf-8?B?bWFydGluMQ==?= |
last post by:
Hi, All,
I try to ping another PC using ping in vb 2005, can anyone provide a snippet
of code?
Thanks in advance,
Martin
|
by: MattPKaiser |
last post by:
I am trying to find a way to check if a computer on a network is
"online" so that I can access a file on a share.
In short I maintain a list of computers that have my service running
(in the...
|
by: Charlie of Bolton |
last post by:
Hi,
I have to below script,
and everything seems to work except
that if I entered the Primary IP and Secondaries IP, with such
number; 10.100.1.11 or 10.10.10.245 the last numbers of my IP...
|
by: SyGC |
last post by:
Hi People,
Im trying to do a simple Loop where by an IP address is pinged (Using My.computer.network.ping) and the results, true or false, are used to invoke another line of code.
Basically if...
|
by: p byers |
last post by:
Good Morning Folks
I have a LAN
Among the several connections to it are the following four devices:
A MAXSTOR network Storage Device
A PC running Microsoft Windows 2000 Server 5.0.2195 (SP4)
A...
|
by: somsub |
last post by:
Can any one help me on ping command .
for this line of code
($ret, $duration, $ip) = $p->ping ($line)
If i give any
1> invalid entry as a parameter ($line) in ping command
or
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |