DataJuggler
Posts: 2
Joined: Fri Feb 03, 2017 1:52 am

One app can't connect to SQL Server, and one can

Fri Apr 15, 2022 2:14 pm

I had a previous version of my app, and everything worked whether installed version or run from Visual Studio.

I upgraded some dll's and my project, and I was getting errors in Advanced Installer Build, so I recreated the project (twice now).

My app is called DB Compare (https://github.com/DataJuggler/DBCompare), and it connects to two connection strings to SQL Server and reads the database schema and shows a comparison report.

Now the installed version can't connect to SQL Server and the System Environment variable for Server name can't be read either from the installed version.

I have another project that does essentially the same thing, and the connection string builder installed with it works. The permissions of the one that doesn't work assigns only 'Special Permission' to my account, and I can't remove it, I get a Class Not Registered if I try and change the permissions in File Explorer.

Also, I tried to use your Permissions as part of Advanced Installer 19.3 and anything I do causes the installer to not install, so i clearly don't know how to use it (or less likely it doesn't work).

Not really sure why one project works, and another doesn't.

Also, when I tried to uninstall just now to try again, I get a 'The installer has insufficient privileges to remove the link to a short cut on the desktop.

Is there any way to export all the settings of a project, so I can compare in a text editor or something?

Thanks, usually a connection string that works via Visual Studio should work in the installed version. Windows or something seems to have my app "isolated" or sandboxed or something.

Catalin
Posts: 6511
Joined: Wed Jun 13, 2018 7:49 am

Re: One app can't connect to SQL Server, and one can

Tue Apr 19, 2022 2:30 pm

Hello,

Unfortunately, it is not qutie clear for me where the problem relies.

Is the problem at installation level, or at your application level.

From what I understand, your application is the one that connects to SQL, not the setup itself.

With that being said, is your application able to connect to SQL Server when ran from Visual Studio? If not, then the issue might be related to the changes you've done to the application and unfortunately that is not something that can be fixed from within your installation setup.
Thanks, usually a connection string that works via Visual Studio should work in the installed version. Windows or something seems to have my app "isolated" or sandboxed or something.
Yes, that would be indeed the case. However, we need to make sure here that every dependency of your EXE is included in the setup package. For instance, if a .DLL is missing from your setup package, then your application may not be able to connect to the server.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”