Note that there are some explanatory texts on larger screens.

plurals
  1. POInvalid setting in Excel key of the Engines section of the Windows Registry
    primarykey
    data
    text
    <p>I have a C# program that imports data from a csv file and puts the data into a SQLServerCE database table (on the local C-drive). The program works on many users' machines, but a few users keep getting the error:</p> <pre><code>System.Data.OleDb.OleDbException (0x80004005): Invalid setting in Excel key of the Engines section of the Windows Registry. at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() </code></pre> <p><strong>Here is the C# code:</strong></p> <pre><code>string connStr = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathToFile + ";Extended Properties=Text;"; string sqlCmd = "SELECT * FROM [" + filenameOnly + "]"; using (OleDbConnection conn = new OleDbConnection(connStr)) { OleDbCommand cmd = new OleDbCommand(sqlCmd, conn); using (OleDbDataAdapter dadapt = new OleDbDataAdapter(cmd)) { conn.Open(); dadapt.TableMappings.Add("Table", dataSourceAlias); dadapt.Fill(ds); conn.Close(); } } </code></pre> <p><strong>I've tried several things already:</strong></p> <ol> <li>verified HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4\Engines\Text has "CSVDelimited" for the Format Key</li> <li>verified the users have the most recent release of Jet4.0 (Msjet40.dll version 4.0.9511.0 Win dows XP SP3 and Security Bulletin MS08-028 )</li> <li>verified HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\Text does not have an extension that is more than 4 characters long</li> </ol> <p>But, after all this, the users still can't import the csv file data because "Invalid setting in Excel key of the Engines section of the Windows Registry"</p> <p><strong>Any suggestions?</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload