using timer select record

Posted by Fugio under VB.NET on 10/26/2014 | Points: 10 | Views : 479 | Status : [Member] | Replies : 0
How can I filter records from the clock set at right angles
In data if I add a column is minute
Time from start plus column-minute
any help?
thanks a lot

Imports System.Data.OleDb    

Public Class Form1
Dim con As OleDbConnection
Dim dt As DataTable
Dim da As OleDbDataAdapter
Dim str As String = "Provider= Microsoft.Jet.OLEDB.4.0;Data Source = " & Application.StartupPath & "\Nwind.mdb;"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim conn As OleDbConnection = New OleDbConnection(str)
Dim dt As DataTable = New DataTable()
For Each _row As DataRow In dt.Rows
Dim _now As DateTime = Now
_now = _now.AddMinutes(_row("Duration"))
Dim sQry1 As String = "select * from tblTimeLoad where Start='" & _now.ToString("yyyy-MM-dd hh:mm:ss tt") & "'"
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sQry1, conn)
DataGridView1.DataSource = dt

End Sub
End Class


(No response found.)

Login to post response