Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SqlDataAdapter da2 = NEW SqlDataAdapter();
- SqlCommand cmd = NEW SqlCommand();
- cmd.CommandText = "SELECT * FROM dataraw WHERE TagID = '101010' AND Date_Time >= @p_StartDate AND Date_Time < @p_EndDate";
- cmd.Parameters.ADD("@p_StartDate", SqlDbType.DateTime).VALUE = dateTimePicker1.VALUE.DATE;
- cmd.Parameters.ADD("@p_EndDate", SqlDbType.DateTime).VALUE = dateTimePicker2.VALUE.DATE.AddDays(1);
- cmd.Connection = conn;
- da2.SelectCommand = cmd;
- da2.Fill(ds1, "statusloei1");
- dv1 = NEW DataView(ds1.TABLES["statusloei1"]);
- dataGridView1.DataSource = ds1.TABLES["statusloei1"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement