how to search data from month to month if :
txtbox1.text = "m/y" or "06/2013"
txtbox2.text = "m/y" or "09/2013"
mysql query code :
SELECT * FROM tb_user WHERE dateregister ?.....
and if, record in table is:
id name dateregister
1 abc 05/05/2013
2 ccc 06/05/2013
3 ddd 01/06/2013
4 ggg 01/07/2013
5 ttt 10/07/2013
6 kkm 20/08/2013
7 ooo 01/09/2013
and I just wanted to take the data from month "06/2013" to "09/2013" and data that I get is:
3 ddd 01/06/2013
4 ggg 01/07/2013
5 ttt 10/07/2013
6 kkm 20/08/2013
7 ooo 01/09/2013
I've tried a variety of query but I always fail..
this is my code in vb.net :
Imports MySql.Data.MySqlClient
Dim connString As String = "Database=dbuser;Data Source=localhost;User Id=root;Password="
Dim conn As New MySqlConnection(connString)
Dim adapter As New MySqlDataAdapter
Dim ds As New DSReportPO
Dim cmd As MySqlCommand
monthx1= txtbox1.text
monthx2 = txtbox2.text
cmd = New MySqlCommand("SELECT * FROM tb_user WHERE dateregister?...", conn)
adapter.SelectCommand = cmd
adapter.Fill(ds.Tables(0))
Frm1.Show()
Frm1.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
Frm1.ReportViewer1.LocalReport.ReportPath = System.Environment.CurrentDirectory & "\Report1.rdlc"
Frm1.ReportViewer1.LocalReport.DataSources.Clear()
Frm1.ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("DSPOListSETUP", ds.Tables(0)))
Frm1.ReportViewer1.DocumentMapCollapsed = True
Frm1.ReportViewer1.RefreshReport()
thanks a lot