Loop To Ping A List Of Ip's Return The Results And Save Them To An Access Db

Aug 6, 2009

Sorry for new thread--i have this code, basically a loop to ping a list of ip's return the results and save them to an access db:

[Code]...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

View 24 Replies


ADVERTISEMENT

Linq Return Results Contaiined In A List?

Mar 23, 2011

How can i select using linq from a datatable where the the only results I want back (ID's) are contained in a list of integers?

View 7 Replies

Ping Using Vb.error - Ping An Ip Address And Store The Result In An Access Db

Jul 8, 2009

i have tried altering some code i have to ping an ip address and store the result in an access db.i had it working when i had the ip hardcoded in as a string but I am now gettin an error.instead of having the ip address hardcoded in to the code i want it to be read in from the access db but im now getting this error:System.nullreferenceExceptionbject reference not set to an instance of an object at...button1.click event args ei have underlined the piece of code i tried to change

Imports System.Data

Public Class Form1

Dim Ping As Net.NetworkInformation.Ping

[CODE]...

View 39 Replies

Save SQL Results Into A List?

Jan 25, 2011

In my database one user can have multiple order. i want to get all orders for a user and save it in a list.[code]...

View 1 Replies

[2005] Ping And Return Value With Async Calls?

Feb 3, 2009

I am trying to run this

vb
Public Sub SendPing(ByVal strHostname As String, ByVal objSelectedNode As TreeNode)
Try
Dim objPing As New Ping

[code]....

My problem is that in this code (and I know it's a lame way to do it) I'm checking to see if the node is Green after the Ping has been completed to determine if the ping was successful. I would prefer to return a boolean value to be True if the ping was successful.

When it executes the SendPing on the DragDrop function, it starts that thread and executes the If statement to determine if the node is green, but the ping isnt complete. Now I have to do this function on many nodes at once, so I dont want this to be a single thread. Is it possible to return a value from an async call and then execute a function after that value has been returned, or will this have to be a single thread?

View 7 Replies

Ping Ip Addresess From A List Of Items That Are In An Xml File?

Oct 27, 2011

winform not webpage is it possible.i need to ping ip addresess from a list of items that are in an xml file and displayed in a datarepeater.and then return the response to a non-databound textbox inside each "record" in the datarepeater.i can ping fine if i hard code ip adresses into the program, but haven't been able to access anything inside the datarepeater.

just as a test i set a messagebox to give me the text of a label i have inside the repeater, even though on screen the label says server02 the message box shows the label.text as being "label15".

View 6 Replies

Start Button Loop A BackgroundWorker With Sleep OracleConnection Results After Each Loop Till Stop Button

May 29, 2012

I have this little application that runs a SQL query works great, now I want to have a Start Button run the and display results then System.Threading.Thread.Sleep(300 * 1000) for 5 min then run again and display results and loop till I buttonstop_click. unsure if the sleep is the best method.

[Code]...

View 2 Replies

Code - Suposed To Go Through All The Computer Names In A List Box And Ping Them

Apr 9, 2009

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Counter As Integer

[CODE]...

The code is suposed to go through all the computer names in a list box and ping them.

View 8 Replies

VS 2008 Execute A CLI Program And Have It Output Or Return What The CLI Program Saids Such As Ping Etc?

Apr 25, 2009

Is there a way i can execute a CLI program and have it output or return what the CLI program sais, such as ping etc.

View 3 Replies

Query A Database And Return The Results?

Jul 22, 2011

I would like to create a vb form with a combo box (with song title), a text box (for song lyrics), and a button (to submit or refresh). It is linked with an access database. The combo box is populated with the songTitle field in the db (this part works fine). The text box is populated with the lyrics that go to that song The first updates fine but I can not figure out how to run a query to pass to the text box's text property. I want the user to be able to select a song from the combo box, click the button, and have the text box populated with the new song's lyrics.

Any suggestions on how to accomplish this, or a good place for a tutorial that explains the necessary elements for having vb query a database and return the results?

View 3 Replies

Return LINQ Results From Function?

Jun 10, 2012

I'm trying to return a single object from an array of objects with linq.[code]...

View 2 Replies

SNMP Query Does Not Return Any Results

Jun 24, 2012

I have been trying to get the Alert Code from my printer at work to see what exactly is happening however each time I send an SNMP query it doesn't return any results. I am using SimpleSNMP references. The printer is a Canon iR-ADV C5045.

This is how I call the function:
Dim strAlertCode As String = SNMPQueryGet("1.3.6.1.2.1.43.18.1.1.7")
This is the function:
Private Function SNMPQueryGet(ByVal OID As String)
Dim strResult As String = "True"
Dim host As String = "192.168.1.202"
[Code] .....

View 1 Replies

VB WebRequest Return Page With No Results

Jan 27, 2011

I am trying to get the html response of a Kayak.com query using a WebRequest object, however more often that not the site returns no results, i just get an empty Kayak page, i have to try the request around 5 times before i get a result back. What can be the cause of this? [Code]

View 1 Replies

Generate A List Of Random Integer With A Click Of The Button And Put The Results In A List Box Using .Net?

Nov 18, 2009

If I can generate a list of random integer with a click of the button and put the results in a list box using VB.Net but how do I randomly change several integer number generated by button 1 by clicking button 2? How I retain the results of button1 and change the results when clicking button2?I try before but the two button function code cannot relate to one another.

View 1 Replies

Run Through Selected Path And Return Results To Array

Nov 20, 2009

So basically, I am running through my selected path recursively and returning the results to an array.. I think.
vb.net
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim path As New FolderBrowserDialog
If path.ShowDialog = Windows.Forms.DialogResult.OK Then
Me.TextBox1.Text = path.SelectedPath
[Code] .....

I was told that to return the search to an array, I add the return toarray() at the end.
Now obviously Im not getting errors, but I am also not polling the results that are in fileslist.toarray(). I've looked at arrays quite a bit, I see their functionality if they are defined like myarray(4) with 5 declared array values... its an array with 5 value places. And to read from any one of the 5, you'd say something like msgbox(myarray(3)) to call the 3rd place in the array.

Well, as you can tell from the code, I am putting a variable amount of information into the array, How can I call that information? If I scanned a folder with 300 files, how can I call the results of that array and put them in a text file, or console, or messagebox through them? And assume I am doing it through a button click event. So, button click to read all input in the array to console or something like that.

View 5 Replies

Search AD With Textbox Value And Return Results As Datatable?

Sep 27, 2010

Currently I have a gridview bound to a datatable which is populated with groups from the AD. I need to be able to add search functionality so users can type in part of a group name and have the results display only groups that fit their search criteria.

Here's what I have so far.

<asp:TextBox ID="searchParam" runat="server"></asp:TextBox><asp:button ID="btnSearch" runat="server" Text="Search" />
<asp:GridView ID="dgSearchDLs" runat="server" AutoGenerateColumns="False" DataKeyNames="cn" DataSourceID="ObjectDataSource1">
<Columns>

[code]....

View 1 Replies

Sql Query Doesn't Return Any Results On Datagrid

Jul 7, 2010

I'm using Visual Studio 2005, and I have a datagrid connected to a table from an Access database.

I added 4 textboxes so the user can type search filters to search within the table and a "search" button.

Then, I created a query using the "add query" tool on the datagrid. I wrote it like: select field1, field2, field3, field4, field5, field6 from table where field1=? and field2 like "%"+?+"%" and field3 like "%"+?+"%"
and field4 like "%"+?+"%"

Both field5 and field6 aren't search criterias, so I didn't add them to the query. Once the query was created, I replaced the parameters inside the procedure with my textbox1.text, textbox2.text, textbox3.text, textbox4.text and then cut and pasted the whole thing inside my SEARCH button click event, so the query is executed when the user clicks on the button.

Now the problem is: when I search using the first field it goes ok, but when I try to search by any of the other fields it returns zero results, even though I double-checked I had written the words correctly. I don't know why it does this. I already tried deleting the datagrid and creating it again.[code]...

View 6 Replies

Tell If A Stored Procedure Does Not Return Results When Using Linqtosql?

Aug 19, 2010

I have a linqtosql dbml where I dropped a stored procedure into the designer interface.

Stored procedure name:
GetUser(@userid int)
Select * from users_tbl where userid=@userid

[code].....

View 1 Replies

VS 2008 Return Results From Function Run In A Thread?

Feb 3, 2010

I am running a query in a thread but I can't figure out how to get the result back to the calling function. I am doing something like this:

Threading.ThreadPool.QueueUserWorkItem(AddressOf RunThread, "some query string")
Private Function RunThread(ByVal stateInfo As Object) As String
Dim myQuery As String = stateInfo.ToString

[Code]....

View 3 Replies

Web Page To Return Results From Two SQL Stored Procs Via VB?

Apr 17, 2011

I am developing an ASPX web page to return results from two SQL stored procs via VB. When I execute these two stored procs, they both return valid data. But for some reason, when I run this report it doesn't return any errors, however, it doesn't return any records/data either!

Also, I can't debug it for some reason, although I can set breakpoints! This is using VS 2008, but I think reason I can't debug is I believe this is a limited version that just works for SSRS and SSIS.

[Code]...

Could the problem be due to the fact that this web page uses the same SQL connection for both stored procs? The first proc should be returned initially, and the second proc after this screen. So I don't need both stored procs information simultaneously, so I would think I could reuse the same SQL connection.

OK, I found where the problem is located. If I just comment out the Level statement in the Where clause, it does return data. So only thing I changed was that one line in my SQL code and it works. This means missing data must be due to datatype incompatibility, no? What is the problem?

View 2 Replies

IDE :: Remove WHERE Statement Than Results Return Fine As Expected

Apr 8, 2009

[code] BUT, in code, watching the locals window for rec.EOF and rec.BOF both return true and therefore no results.Why does this work in VB Query Designer but not in code? If I remove the WHERE statement than the results return fine as expected.But its returning ALL of the results which is no good.

View 1 Replies

Syntax To Search (and Return Results) In Two Dimensional Array

Jan 11, 2012

The following code works just fine:
Dim wksSheetNames(0 To xlsWB.Worksheets.Count - 1, 0 To 1) As String
Dim i As Integer = 0
For Each Wks In xlsWB.Worksheets
Wks.Activate()
wksSheetNames(i, 0) = xlsApp.ActiveSheet.codename
[Code] .....

What is the best vb.net based search method that would permit me to search for i.e. "Sheet2" and be able to obtain "Cats"? I attempted to ascertain the index number of "Sheet1" with:
Dim SheetArrIndex As Integer = Array.IndexOf(wksSheetNames, "Sheet1")

Then obtain the value "Cats"
wksSheetNames(SheetArrIndex, 1)

But I received an error message:
Code Line ->>>> "Dim SheetArrIndex As Integer = Array.IndexOf(wksSheetNames, "Sheet1")"
Error msg ->>>> "Only single dimension arrays are supported here.:
Obviously I do not know how to Search and Return the results of a 2D array.

View 12 Replies

How To Loop Through LINQ Results

May 17, 2010

I've got some code to try and loop through LINQ results, but it doesn't seem to be working.

HERE'S THE CODE

Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
''# the page contenttype is plain text'

[Code]....

View 1 Replies

VS 2008 For Loop Through Results?

Aug 26, 2009

I can't think of a better way to do this, what i have is this function:

vb.net
Function functionDealWithHiddenFields(ByVal HTML As String, ByVal numHiddenFields As Integer)

[Code].....

which usually contains: 4 so when i loop out the names, it loops the 4 results, 4 times, instead of just showing me the names 4 times so i can then store them

View 2 Replies

Pass / Submit The Data To The WebService And Return Back The Results

Jul 9, 2011

Trying to find some code to assist with accessing a web service. I am a newbie when it comes to web services and don't quite get the whole how to submit the request and then read the results. I know from searches that people request a copy of the WSDL file so I have attached (SystemManagementService.wsdl)

[Code]...

View 4 Replies

Compare Two Access Databases With Two Fields Each And Write The Results To A Third Access Database?

Apr 22, 2010

I am using the code shown below to compare two Access databases with two fields each and write the results to a third Access database. I am getting an error at the "Do While DMReader02.Read = True" line: "Invalid attempt to call Read when reader is closed." Why would the reader be closed at this point if I am using different DataReaders in the two loops?

Imports System.Data.OleDb
Partial
Class Form1

[code]....

View 2 Replies

Cannot Populate The Data Grid With The Results Of Loop

Mar 9, 2009

why I cannot populate the data grid with the results of my loop>

Public Class FormInput
'The disabled close button declarations;written by Achmad Zeanuri
Private Const MF_BYPOSITION = &H400

[Code].....

View 2 Replies

VS 2005 - Loop Through Results In Textbox (Removing The Last)

Apr 9, 2009

Private Sub CopySelectedNodes(ByVal nodes As TreeNodeCollection)
For Each node As TreeNode In nodes
If node.Checked Then
'MessageBox.Show(node.FullPath)
Me.CopySelectedNodes(node.Nodes)
[Code] .....
This does not work, I want to loop through results so the textbox1 will be like 151,154,3,151, and I want to remove the last.

View 2 Replies

VS 2008 Listbox Displaying Sql Results In A Loop?

Aug 27, 2009

I have a listbox displaying sql results in a loop. Let's say I want to select one of those results and click a delete button. I have the button and box setup displaying the results just fine, I just do not have the functionality. How would I do that?

View 18 Replies

VS 2010 Return Items In A List Before Returning The List?

May 23, 2012

That was probably bad title, but I'll illustrate what I'm trying to do. I have a method in a class that I need to call several times. The method returns a List(Of String). I'm just grabbing some information from a database.

VB.NET
Public Function GetTestList() As List(Of String)
Dim int As Integer = 0

[code]....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved