Not a legal OleAut date.

Before my PC updated itself to Window 10 the Following Code Worked Fine now we are getting the error Not a legal OleAut date.

string strSql = "Select * from [" + _TableName + "]";
string strProvider = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + OlddataPath + GetMonthName(i, true).ToString() + "comp.mdb";
                        OleDbDataAdapter daCheck = new OleDbDataAdapter(strSql, strProvider);
                        DataTable dtCheckit = new DataTable();
                        daCheck.Fill(dtCheckit); // Error Displayed Here

private static string GetMonthName(int month, bool abbrev)
            DateTime date = new DateTime(2015, month, 1);
            if (abbrev)
                return date.ToString("MMM");
                return date.ToString("MMMM");

All we are trying to do is open a Table Called AuditLog for example in c:\OldLocation\JanComp.MDB next time around the database will be c:\OldLocation\FebComp.MDB etc.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl TawnSystems and Integration DeveloperCommented:
Where is i coming from in your code? Is this, perhaps, somehow getting an illegal value?
eoinismeAuthor Commented:
I have done the following in the Immediate Window and here are the results
? strSql
"Select * from [AuditLog]"
? strProvider
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\OLDDataBaseLocation\\Aprcomp.mdb"

I can not see any errors in it
eoinismeAuthor Commented:
After further investigation I turned out to be corruption in the table in the database

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
eoinismeAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.