I developed an application (100% local, no access to servers) using SQL Server Compact 3.5, and it works fine on my computer. However, when I deployed it on another computer, it shows this error:
Access to the database file is not allowed. [ File name = data\BDApepucCE.sdf ]
Make sure you use
|DataDirectory| in your connection string.
Here is an example
I had the exact same problem ay you and I managed to fix it by adding the |DataDirectory| to my connection string.