Access Denied of the SDF in mode ReadOnly

  • Hi,

    i'm planning to use SqlServerCe that read SDF file from DVD rom.

    To do that, I started with that connection string:

    String.Format("Data Source = Database1.sdf;Mode = Read Only;Temp Path={0} ;Persist Security Info=False;","c:\\ASpecialFolder");

    This application, open, read and close the database.

    If i run the application on the DEV machine (vista 32, vs2008 sp1,sqlserverce sdk) all run well, from CDROM,DVD,or a local disk folder.

    Instead from others machine (2003,xp or vista) nothing .. error with this excetpion (inner was null)...

    Message: Permission denied.

    Source: SQL Server Compact ADO.NET Data Provider

    StackTrace: at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)

    at System.Data.SqlServerCe.SqlCeConnection.Open()

    at ConsoleApplication2.testservice.GetDBInfo() in C:\X\Test\ConsoleApplicatio

    n2\ConsoleApplication2\testservice.cs:line 46

    at ConsoleApplication2.Program.Main(String[] args) in C:\X\Test\ConsoleApplic

    ation2\ConsoleApplication2\Program.cs:line 19

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply