|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
uint32 conversion on win32_pingstatus'192.168.0.1'" Dim search1 As New ManagementObjectSearcher(str) Dim result As ManagementObject Try For Each result In search1.Get If result("statuscode") = 0 Then Console.WriteLine("computer response") Else Console.WriteLine("invalid computer") End If Next Catch ex As Exception Console.WriteLine(ex.Message) End Try i keep on getting exception error : Cast from type 'UInt32' to type 'Integer' is not valid. Pls advise Hi,
Try this. Dim intResult As Integer = Integer.Parse(result("statuscode").ToString) If intResult = 0 Then Ken -------------------------- Show quoteHide quote "James" <jkk***@hotmail.com> wrote in message news:uVj1gtkFGHA.1028@TK2MSFTNGP11.phx.gbl... > > Dim str As String = "select * from win32_pingstatus where address= > '192.168.0.1'" > Dim search1 As New ManagementObjectSearcher(str) > Dim result As ManagementObject > > Try > For Each result In search1.Get > If result("statuscode") = 0 Then > Console.WriteLine("computer response") > Else > Console.WriteLine("invalid computer") > End If > Next > Catch ex As Exception > Console.WriteLine(ex.Message) > End Try > > > i keep on getting exception error : Cast from type 'UInt32' to type > 'Integer' is not valid. Pls advise > >
Re-post, Help really needed here ! Dataview binded to Textbox for edits, I can't save the change.
Drag and Drop to SysTray ? array in dataset Waiting for a process/program to start COBOL Packed decimal converter to VB decimal filewatcher file modification updating listbox with database update computer properties in vb.net Handling Events in VB.Net VB.Net Web Service |
|||||||||||||||||||||||