none
Infamous "Internal error: Cannot open the shared memory region." error. RRS feed

  • Dotaz

  • Trying to open an SDF file using Sql/ce 4.0 SP1.  The SDF file lives in 'C:\Program Files (x86)'.  The permissions are set up so that Users have Read & Execute permissions on the file.  The client program is running as a regular user and tries to open the SDF using this connection string...

    "Data Source='{path-to-database-file}'; Password='{password}'; Max Database Size=4000;Mode=Read Only;Temp Path={users-temp-path};"

    Opening a connection using that connection string results in "Internal error: Cannot open the shared memory region."

    The same code, when run as administrator, works perfectly.

    If I add Modify & Write for all Users, it works perfectly as a regular user.

    If I move the file to a app data, it works perfectly for that regular user.

    Based on this evidence it looks like Sql/Ce cannot open a file for read only without the ability to write to the file.

    Based on customer requirements nothing in 'C:\Program Files (x86)' can be writable by regular users and all regular users need read-only access to the file.

    What's up?  What am I Missing?  Is this just not possible?

    Thanks.

    pátek 28. února 2020 20:28