GetdataBy date doesn't work Why?
- by vp789
I am trying to pull the data by date in vb.net. It is not throwing the error nor giving any result. Whereas It shows the results in table adapter configuration wizard when I try through query builder. I am using date time picker in the form. But I have formatted the date in the database as date.I am puzzled.
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
Try
Dim dt As Date = CDate(tspTextDate.Text)
Me.Bank_transactionsTableAdapter.GetDataByDate(dt)
'Catch ex As Exception
Catch ex As FormatException
MessageBox.Show("date is wrong", "Entry Error")
Catch ex As SqlException
MessageBox.Show("SQL Server error#" & ex.Number _
& ":" & ex.Message, ex.GetType.ToString)
End Try
End Sub
rows of data
BT102 4/5/2010 BKS 200.00 1200.00 1400.00
BT103 4/5/2010 BKS 200.00 1400.00 1600.00
BT105 4/6/2010 BKS 200.00 1800.00 1800.00