Bob Garon

Bob Garon

  • 1.6k
  • 12
  • 351

Loading data from Access to Datagridview

Feb 1 2024 7:22 AM

hi,

I was able to display the contents of a certain table with Date/Time Extended field. My problem is when viewing, the datagridview, the dates were late by exactly one month! Any help would be appreciated. thanks!

            connection = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strAccessPath + ";Persist Security Info=False;");
            dataAdapter = new OleDbDataAdapter("SELECT * FROM BERData", connection);
            dataTable = new System.Data.DataTable();
            dataAdapter.Fill(dataTable);

            dataGridView1.DataSource = dataTable;

access:

datagridview:


Answers (3)