The connection string is fine (usually I do not specify Max Database Size, you can try to remove the parameter, but I'm sure this is not a problem). So, in your case, I think you are probably opening the database with a different password (as the exception suggests) or you are opening the wrong database. Try to specify the absolute path and open the database from this path, for example
<connectionStrings> <add name="ExamManagement" connectionString="Data Source=C:\temp\Pikeman.sdf;Password=123;" providerName="System.Data.SqlServerCe.4.0" /> </connectionStrings>
source share