I use a SQL Server CE database from my application. My program is located on a DVD.
I cannot read data from the database on the DVD, I set SQL connection string mode to read only but it doesn’t work (I just want to read data from db)
ERROR:
Opening a database as read-only requires a temp path to be specified.
[ Db name = C:\Users\Ali\AppData\Local\Temp\Rar$EX52.280… ]
please help!
In order to open a SQL Server CE database file (SDF) on read-only media, you also need to add two additional parameters to the connection string
You could do this as follows:
If you are getting your connection string from App.Config
see https://stackoverflow.com/a/10731515/19624