SQL Connections and Running Scripts

Having trouble running Advanced Installer? Got a bug to report? Post it all here.

SQL Connections and Running Scripts

Postby proactis » Thu Aug 04, 2011 3:40 pm

I have followed the instructions for creating a screen that allows a user to choose whether to use SQL or Windows login, but I fail to get this to work.

http://www.advancedinstaller.com/user-g ... -type.html

I am trying to connect to the server then run a simple SQL script that will then create a database.

The error that I am receiving is

[SQLDriverConnect] {SQL_STATE: IM002}
[Microsoft][ODBC Driver Manager] Data source name
not found and no default driver specified
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Re: SQL Connections and Running Scripts

Postby Bogdan » Thu Aug 04, 2011 4:18 pm

Hi,

Can you also try analyzing the following tutorial, to check the settings from your project.

If you cannot make it work after analyzing it please attach your project file on the forums or send it to us by e-mail at support at advancedinstaller dot com so we can take a look.

Regards,
Bogdan
Bogdan Mitrache
Advanced Installer Team
http://www.advancedinstaller.com/
Bogdan
 
Posts: 2398
Joined: Tue Jul 07, 2009 7:34 am

Re: SQL Connections and Running Scripts

Postby proactis » Thu Aug 04, 2011 4:39 pm

Hi there,

I don't think that link will allow me to use windows authentication.

D
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Re: SQL Connections and Running Scripts

Postby proactis » Thu Aug 04, 2011 4:52 pm

Here is the install file that I have tried to get to work without any success.

THanks

Darren
Attachments
SQL_Connection.aip
(14.33 KiB) Downloaded 48 times
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Re: SQL Connections and Running Scripts

Postby Bogdan » Fri Aug 05, 2011 12:05 pm

Hi,

I recommended the tutorial so you can make sure the rest of the settings are correct, I know is not related to your authentication method.

I noticed you added a new driver in ODBC page but your connection is using the "SQL Server" one. Can you please try selecting your own driver?
Also, the correspondence for the server and database properties is broken, i.e. in SQL Scripts page you are using the properties DBSERVER_PROP, DBNAME_PROP while
in Dialogs page you are using the properties "SERVER_PROP" and "DATABASE_PROP".

You should first try the settings so you know for sure the default configuration works and then try to modify it for the desired authentication method.

Regards,
Bogdan
Bogdan Mitrache
Advanced Installer Team
http://www.advancedinstaller.com/
Bogdan
 
Posts: 2398
Joined: Tue Jul 07, 2009 7:34 am

Re: SQL Connections and Running Scripts

Postby proactis » Fri Aug 05, 2011 2:32 pm

What I want to achieve is have a screen that takes the parameters that I set, be it windows or sql authorisation then use these to connect to a database then run some sql scripts against that database.

All of which seems very difficult to get to work.

Do you have an example project that you can give me?
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Re: SQL Connections and Running Scripts

Postby Bogdan » Fri Aug 05, 2011 2:40 pm

The article which you've first mentioned contains a sample. Just follow this link.

Regards,
Bogdan
Bogdan Mitrache
Advanced Installer Team
http://www.advancedinstaller.com/
Bogdan
 
Posts: 2398
Joined: Tue Jul 07, 2009 7:34 am

Re: SQL Connections and Running Scripts

Postby proactis » Fri Aug 05, 2011 4:03 pm

I have downloaded the file, and changed it slightly, but it still refuses to work for windows authentication.

I have attached the install file and a word doc with the errors that I receive when using windows authentication
Attachments
SQLConnection.aip
(23.18 KiB) Downloaded 51 times
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Re: SQL Connections and Running Scripts

Postby mihai.petcu » Mon Aug 08, 2011 9:08 am

Hello,

There is no word document attached, only the .AIP.

The sample project is tested throughly and should work. Your modified project seems to be configured correctly.

Can you please make sure your credentials and settings work in a SQL management application? If they do, please use them to connect via the installer built with from the sample project( no modifications ) and see the outcome.

All the best,
Mihai
Mihai Petcu
Advanced Installer Team
http://www.advancedinstaller.com/
mihai.petcu
 
Posts: 3452
Joined: Thu Aug 05, 2010 8:01 am

Re: SQL Connections and Running Scripts

Postby proactis » Mon Aug 08, 2011 10:09 am

Here are the errors that I receive
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Re: SQL Connections and Running Scripts

Postby mihai.petcu » Mon Aug 08, 2011 12:42 pm

Hi,

The attachment is probably not supported. Can you please send it to support at advancedinstaller dot com instead?
Also, please reply to my other suggestions as well.

All the best,
Mihai
Mihai Petcu
Advanced Installer Team
http://www.advancedinstaller.com/
mihai.petcu
 
Posts: 3452
Joined: Thu Aug 05, 2010 8:01 am

Re: SQL Connections and Running Scripts

Postby proactis » Mon Aug 08, 2011 1:02 pm

Again
Attachments
errors.zip
(65.29 KiB) Downloaded 55 times
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Re: SQL Connections and Running Scripts

Postby proactis » Tue Aug 09, 2011 11:34 am

Any other ideas why this won't work?
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Re: SQL Connections and Running Scripts

Postby mihai.petcu » Tue Aug 09, 2011 1:44 pm

Hello,

Can you please make sure your credentials and settings work in a SQL management application? If they do, please use them to connect via the installer built with from the sample project( no modifications ) and see the outcome.

All the best,
Mihai
Mihai Petcu
Advanced Installer Team
http://www.advancedinstaller.com/
mihai.petcu
 
Posts: 3452
Joined: Thu Aug 05, 2010 8:01 am

Re: SQL Connections and Running Scripts

Postby proactis » Tue Aug 09, 2011 2:21 pm

ok, I have done and it works as sql statment but not installer
proactis
 
Posts: 10
Joined: Thu Aug 04, 2011 11:36 am

Next

Return to Common Problems

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests