execlcon.Connected:=false;
execlcon.Close;
execlcon.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+OpenDialog1.FileName+';Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";Persist Security Info=False'; //
execlcon.Connected:=true;
提示:檢測到錯誤類EOleException,無效的引數量!
應該就是Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
這一句的問題。
我在網上找了許久也沒找到應該怎樣去定義
uj5u.com熱心網友回復:
execlcon.Connected:=false;
execlcon.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+OpenDialog1.FileName+
';Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";Persist Security Info=False';
execlcon.Connected:=true;
//記得保證檔案存在
uj5u.com熱心網友回復:
當然我會保證檔案存在,我都直接用一個檔案的路徑去試,也是一樣的提示。
所以我認為是——————Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
的問題點
uj5u.com熱心網友回復:
謝謝這位大哥,真的是這個問題,我暈了~
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/151941.html
標籤:數據庫相關
