Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Filter Start Date to End date.


Filter Start Date to End date.

Author
Message
bottommy
bottommy
Forum Guru
Forum Guru (137 reputation)Forum Guru (137 reputation)Forum Guru (137 reputation)Forum Guru (137 reputation)Forum Guru (137 reputation)Forum Guru (137 reputation)Forum Guru (137 reputation)Forum Guru (137 reputation)Forum Guru (137 reputation)

Group: Forum Members
Posts: 1, Visits: 6
using (MySqlCommand cmd = new MySqlCommand("SELECT * FROM completeup WHERE Date_Time_Down >= @FromDate and Date_Time_Down <= @ToDate", con))

{

using (MySqlDataAdapter da = new MySqlDataAdapter(cmd))

{

cmd.Parameters.AddWithValue("@FromDate", (this.frtxt2a.Text));

cmd.Parameters.AddWithValue("@ToDate", (this.Totxt2a.Text));

excelbtn.Enabled = true;

DataSet ds = new DataSet();

da.Fill(ds);

CmpleHisGV.DataSource = ds;

CmpleHisGV.EmptyDataText = "No Record(s) Found";

CmpleHisGV.DataBind();

}

}

C# learner
Mark
Mark
Forum God
Forum God (16K reputation)

Group: Moderators
Posts: 1.1K, Visits: 11K
Are you getting an error or just nothing returned? I would assume when you are adding the date to the parameter you would need to convert the text value to a date value.
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search