var conn = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\kt\\Documents\\VS Code\\TEST_EXCEL\\aa.xls;Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1;\"");
conn.Open();
但這支程式前陣子用的好好的呀! 為什麼今天卻發生了這樣子的錯誤呢?
於是往 Windows 更新來看,發現有2個更新,如下,
windowsUpdate.png
查看一下 kb4041681 , 裡面有更動到 Microsoft JET Database Engine 而我們是有用到它呢!!! 於是將它反安裝後重新開機後,再執行程式就沒問題了。
Security updates to Microsoft Windows Search Component, Windows kernel-mode drivers, Microsoft Graphics Component, Internet Explorer, Windows kernel, Windows Wireless Networking, Microsoft JET Database Engine, and the Windows SMB Server.