There is a Windows Forms project in C # using the Access database. Various sorting works standard inline queries and output
this.hotelTableAdapter.FillByLonger(this.hoteldbDataSet.hotel);
in this format.
It remains to do the last, this is sorting by date. To do this, transfer the selected date to the DataTimePicker in the SQL query.
C #
private void dateTimePicker1_ValueChanged(object sender, EventArgs e) { DateTime result = dateTimePicker1.Value; this.Text = result.ToString(); }
SQL
SELECT id, [ФИО проживающего], [Дата заселения], [Дата выселения], [Гостиничный номер] FROM hotel WHERE ([Дата выселения] LIKE '" + dateTimePicker1.Text"')
Question. How to sort by date? Is the parameter passed correctly? Swears on To_DATE () in request. How to do it, has not yet decided. I found out only that the format for the request should get something like this # 13/11/2013 #