cannot update the database or object is read only


  • i am reading data from an excel file using OledbDataReader

    but it shows error "cannot update the database or object is read only".

    but in case of .csv file its working fine.

    can u tell me the actual problem ?

    Saturday, November 17, 2012 3:16 PM


  • Hi Ray,

    Sorry for the delay.

    According to the KB article, we should modify the regedit registry key instead of the connect string. If you use 64-bit Operating System, the target registry key is:


    For your convenience, I have included a screenshot to show how to modify the registry key:


    Mike Yin
    TechNet Community Support

    Tuesday, November 27, 2012 2:02 AM
  • Hi RRRay,

    The root cause may be that the Excel extension cannot be recognized by Jet, while the .csv name extension is allowed by default. To resolve the issue, please modify the following registry key to include the extension of the Excel file:

    Note: Please back up the entire registry before making any modifications so that we can restore the registry if any problem occurs.

    For more information, please refer to the following article that is about the Access 2000:

    If you are importing the Excle files using Import/Export Wizard, I suggest that you also try to import the Excel fils to the SQL Server Database using T-SQL script. For the detailed information, please see:

    Hope this helps.


    Mike Yin

    TechNet Community Support

    Monday, November 19, 2012 4:54 PM

All replies