3
Answers

Loading data from Access to Datagridview

Bob Garon

Bob Garon

1y
764
1

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)