我的工作正在工作,它在 DataGridView 中输出我的表列名称,但我的数据没有显示出来,是他们的一些我在这里丢失了吗?
private void button1_Click(object sender, EventArgs e)
{
DateTime dt = this.dateTimePicker1.Value.Date;
DateTime dt2 = this.dateTimePicker1.Value.Date;
command.CommandType = CommandType.Text;
command.CommandText = ("SELECT * FROM BillingSystem WHERE DateOfTransaction BETWEEN #" + dt.ToShortDateString() + "# AND #" + dt2.ToShortDateString() + "#");
OleDbDataAdapter adapter = new OleDbDataAdapter(command.CommandText, connectionBilling);
DataSet ds = new DataSet();
adapter.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
connectionBilling.Close();
}