Connect to a SQL 2008 R2 DB - 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!

RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Connect to a SQL 2008 R2 DB

Hello,

so far I had not really a problem testing Advanced Installer. But now I ran into a brick wall.

The application I want to install with andvanced installer requires a SQL-Database. Its no problem at all to install the server with the Prerequisites.
Once the application is installed, I want to run sql srcipts. But I just can't connect to the Database through the installer. I can connect to the server through an ODBC SQL Native client 10 driver.

The funniest part was, wenn I wantet to add the dll of the driver (sqlncli10.dll) that only short names (8.3) are allowed (Why?!)

After I renamed the dll, I was able to add the driver. But what Attributes do I have to set?
Regarding ODBC I have no expirience at all. Not to speak of advanced installer which I'am testing since around 5 days.

Thank you for your Support in advance.
Tobias
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Connect to a SQL 2008 R2 DB

Hi Tobias and welcome to Advanced Installer forums,

Thank you for your interest and for taking the time to evaluate Advanced Installer.

We recommend evaluating the latest version of Advanced Installer(8.8.2). Why haven't you downloaded this version from our website?

Here are a couple of articles and subarticles you can follow to accomplish almost anything with SQL in Advanced Installer:
http://www.advancedinstaller.com/user-g ... tions.html
http://www.advancedinstaller.com/user-g ... t-sql.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Re: Connect to a SQL 2008 R2 DB

Hello Mihai,

I did download 8.8.1 last week and also applied the latest patch 8.8.2.

So far, I consultet your userguide, several times.

One mistake on my side was, that I tried to use the wrong driver. Now I'am using "SQL Server Native Client 10.0", but still I can't connect to the Database. I also installed the SQL Management Studio on my Virtual Machine to make sure, that I can really connect to the SQL-Server localy. The connection refuses to work with AI only, everything else seems to be able to connect, I just don't get why...

My last Approach was to use a Custom Connection with the following Connectionstring: Driver={SQL Server Native Client 10.0};Server=[ServerName];Uid=sa;Pwd=[SA_PW];Database=Master;

But this did also not work... All I get is the Message: "ODBC Connect: timeout exceeded".

Thanks,
Tobias
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Connect to a SQL 2008 R2 DB

Hi Tobias,
Driver={SQL Server Native Client 10.0};Server=[ServerName];Uid=sa;Pwd=[SA_PW];Database=Master;
Can you please try:
Driver=[\{]SQL Server Native Client 10.0[\}];Server=[ServerName];Uid=sa;Pwd=[SA_PW];Database=Master;
as mentioned in this related article.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Connect to a SQL 2008 R2 DB

Also, you might want to use a public property for the server name:
SERVER_NAME instead of ServerName

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Re: Connect to a SQL 2008 R2 DB

Hello Mihai,

thank you, I was finally able to connect successfully to the SQL-Server und run the scripts.

But now there is another question...

In the SQL-Script you can declare script replacements. At which point does AI replace the placeholders?
Eventhough I set my public Property [DBNAME], the placeholders are replaced with the default value of the property.
And yes, I did create an SetProperty event on the "Next" button.

Thanks so far,
Tobias
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Connect to a SQL 2008 R2 DB

Hi Tobias,
At which point does AI replace the placeholders?
Actually, the replacements are executed when the package is built, not at install time.

If you find any GUI controls confusing or are unclear about current view functionality, simply press F1 inside Advanced Installer and the corresponding help article will pop up.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Re: Connect to a SQL 2008 R2 DB

Hello Mihai,

I've used that button really often ;)
But I should have read the whole sentence, not the half of it.

Though it would have been really nice to have the replacements executed at install time.

Thank you again for your support :)
Tobias
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Connect to a SQL 2008 R2 DB

Hi Tobias,
Though it would have been really nice to have the replacements executed at install time.
Here's a similar thread that may help.

You're welcome & All the best :D
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”