我正在使用.net4.0和c#語言。 在我的代碼,我有一個連接字符串c#,oledb連接字符串問題
oleConnection.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;
Data Source = " + filepath + ";
Extended Propertie s= \"Excel 12.0;HDR=yes\"";
,它工作得很好。但是,當我更改連接字符串是這樣的:
oleConnection.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;
Data Source =" + filepath + ";
Extended Properties =\"Excel 12.0;HDR=no\"";
(我改變HDR參數「無」) 我得到錯誤:沒有爲一個或多個必需的參數給定值。從"Microsoft Office Access Database Engine".
哦,你是對的!!!!!這是我的愚蠢錯誤=(((( – Nikita