We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

sinanchik
Posts: 3
Joined: Tue Apr 08, 2014 12:53 pm

Connection with SQL Compact Edition

Hello, I added my sql compact db from "Files and Folders" to Application Data. When I install the setup it create in that folder. Until now perfect. But when I run application it's giving me error about connection... Form Visual Studio it's working fine. My connection string in app.config file. I use Entity Framework. And I added all references. I cant get it where is the problem. By the way, First time I use your program. I like it, it's so simple to use
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Connection with SQL Compact Edition

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm not so sure why this happens. Can you please make sure that you have added in your setup project all prerequisites required by your application? For example, you can add our SQL Server Compact predefined prerequisites package to your setup project and try again?

Also, can you try to debug your application in order to see exactly what fails during SQL connection?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sinanchik
Posts: 3
Joined: Tue Apr 08, 2014 12:53 pm

Re: Connection with SQL Compact Edition

Hello Daniel,

I got this error.

Message "No connection string named 'dbPhotosOrganizerEntities' could be found in the application config file." string

But I do have "dbPhotosOrganizerEntities" connection string name. When I run project from VS 2013 its working fine.

I added .Net 4.0 and SQL Server Compact from prerequisites.
sinanchik
Posts: 3
Joined: Tue Apr 08, 2014 12:53 pm

Re: Connection with SQL Compact Edition

Should I add app.config file by manually?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Connection with SQL Compact Edition

Hello,

I'm not sure why your application fails with the above message. Can you please make sure that your application config file is installed alongside your application file? You can add it in "Files and Folders" page from your project.

Also, you can take a look on the "Fetching connection string from appconfig file in c#" thread which could be useful for you.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”