Im having a problem where a client sends an ipaddress to be checked for in the database, it should either return null for the values selected or return the ipaddress and latency for the ipaddress sent.
But it only returns the values that the client sends and seems to not check the database.
Here is the code that is suppsoed to check the database and return the valeus stored in it:
Code: sSQL = "SELECT IPAddress, Latency FROM twmData WHERE IPAddress = ('" & textarray(0) & "')"
Dim cmd As New OleDb.OleDbCommand(sSQL, conNect)
Dim sqlrep As Integer
Dim dr As OleDb.OleDbDataReader
sqlrep = cmd.ExecuteNonQuery()
Dim myCommand As New OleDb.OleDbCommand(sSQL, conNect)
Dim test2
Dim test4
dr = myCommand.ExecuteReader
While dr.Read()
WriteLine(dr(0))
WriteLine(dr(1))
' writing to console
End While
But it only returns the values that the client sends and seems to not check the database.
Here is the code that is suppsoed to check the database and return the valeus stored in it:
Code: sSQL = "SELECT IPAddress, Latency FROM twmData WHERE IPAddress = ('" & textarray(0) & "')"
Dim cmd As New OleDb.OleDbCommand(sSQL, conNect)
Dim sqlrep As Integer
Dim dr As OleDb.OleDbDataReader
sqlrep = cmd.ExecuteNonQuery()
Dim myCommand As New OleDb.OleDbCommand(sSQL, conNect)
Dim test2
Dim test4
dr = myCommand.ExecuteReader
While dr.Read()
WriteLine(dr(0))
WriteLine(dr(1))
' writing to console
End While