ShowDatabases + Trusted Connection = NoDatabases? - Advanced Installer Community

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!

rprussell
Posts: 38
Joined: Tue Feb 24, 2009 5:34 pm

ShowDatabases + Trusted Connection = NoDatabases?

Hi, all -

I've been going back and forth with Cosmin a bit via Email, and I was wondering whether anyone else has had experiences with this.

I have the need to browse for a database on a server, and so I'm using the handy dandy BrowseSqlServers and ShowDatabases options to do so.

The SqlConnectionString property is based on whether the SqlTrustedConnection prop is set.

For a Trusted connection, we end up with no uid, pwd or Database specified - something like:
  • Driver={Sql Server};Trusted_Connection=yes;Server=(local);
And for a user/pwd combo it looks like:
  • Driver={Sql Server};Server=(local);Uid=blah;Pwd=foo;
The problem is that while the connection with a uid/pwd combo returns a list of databases, the trusted connection one returns an empty string. Note that I have full admin rights to the SQL 2008 installation on my PC, can attach and browse, create, delete, everything, via SQL Management Studio. That is, the connection ought to be VERY trusted.

I've tested both with "Sql Server" as a driver, and also "Sql Native Client".

Help?

Rob
rprussell
Posts: 38
Joined: Tue Feb 24, 2009 5:34 pm

Re: ShowDatabases + Trusted Connection = NoDatabases?

(listens to the crickets chirp...)

Okeydoke - so how about the flip side?

Who's using the ShowDatabases function successfully on SQL 2005 or later, using Trusted_Connection=yes?

It's more than possible that we have a setting wrong on our server somewhere...

Thanks again,
Rob
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: ShowDatabases + Trusted Connection = NoDatabases?

Hi Rob,

By default the SQL Server should support trusted connections. I'm not sure why your server doesn't. You can first test using our sample project. If it doesn't work, most likely the server is not configured correctly. For testing purposes you could try creating a new server with the default configuration and see if the sample project works. If it does, you can start modifying the server configuration (like the real one you are using) and see when it stops working.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jani.matyas
Posts: 2
Joined: Thu Mar 18, 2010 2:38 pm

Same problem + BrowseSqlServers issue

Hello,

I ran into the same situation with Advanced Installer 7.5.2.
I've installed and configured the SQL Server 2008 instance in order to operate in mixed mode (Windows + SQL Server Authentication). The dialogs are created step-by-step according to the description in the Help How-tos.
Also what is interesting that I have multiple SQL Server instances, and the BrowseSqlServers custom action returns only the default instance. I tried with both SqlServerBrowseMethod=1 and SqlServerBrowseMethod=2.
The SQL Server Browser service is running.

Regards,
Matyas
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: ShowDatabases + Trusted Connection = NoDatabases?

Hi Matyas,

I'm not sure why this happens. Does our sample project work correctly with your server? Also, can you please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”