---Threading.Thread.CurrentThread.Sleep(1000)
---system.threading.thread.sleep(5000)
Dim dt As DataTable
Dim dr As OleDbDataReader
Dim sb As New StringBuilder()
Dim Com As OleDbCommand
sb.Remove(0, sb.Length)
sb.Append("SELECT lat,lon ")
sb.Append("FROM Loc ")
sb.Append("WHERE Nameplace like @Nameplace")
Dim sqlStr As String = sb.ToString()
Com = New OleDbCommand
With Com
.CommandType = CommandType.Text
.CommandText = sqlStr
.Connection = Conn
.Parameters.Clear()
.Parameters.Add("@Nameplace", OleDbType.VarChar).Value = "C1"
dr = .ExecuteReader()
If dr.HasRows Then
dt = New DataTable()
dt.Load(dr)
x_gps = CInt(dt.Rows(0).Item("lat").ToString)
y_gps = CInt(dt.Rows(0).Item("lon").ToString)
End If
*******system.threading.thread.sleep
.Parameters.Clear()
.Parameters.Add("@Nameplace", OleDbType.VarChar).Value = "C2"
dr = .ExecuteReader()
If dr.HasRows Then
dt = New DataTable()
dt.Load(dr)
x_gps = CInt(dt.Rows(0).Item("lat").ToString)
y_gps = CInt(dt.Rows(0).Item("lon").ToString)
End If
End With
End Sub