Worrying problem with SQL Scripts - 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!

jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Worrying problem with SQL Scripts

I am using SQL custom connections to install stored procedures.

Today I am finding that not all stored procedures under a certain connection are being installed. TI have set the abort of error option on all of these scripts. I get no erors and all of the scripts are displayed in the log when I run with log. all of the names although some appear shorted are appearing in the AI_SQLScripts table.

I went back to a previous project (different product) and ran the installer for this. Once again I find one of the scripts is missing in the database even though again the script is present as above. I checke dthis script to see of there was just duplicate text from another script in it but it is a unique procedure name.

There is something seriously wrong here. What would you sugegst I do about this? Without these scripts the application is useless. Why is it installing some and not others? The only restriction on installation is: -
((&SQLINSTALLATION = 3) AND NOT (!SQLINSTALLATION = 3))
SQLINSTALLATION is set at feature selection.

I think it may be a missing GO at the end of each script?

Regards,
John
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Worrying problem with SQL Scripts

Hi John,

I am not sure why this is happening. If you supplied GO statement separator in the "Statement separator (SQL Batch file separator)" field of your SQL script, during installation the SQL script batch file will be automatically split into component statements using the supplied statement separator and each SQL statement will be executed individually. Otherwise, SQL script will be executed as a whole.

Perhaps our Configuring Databases with SQL Scripts sample tutorial will help.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Worrying problem with SQL Scripts

Hi,

I changed all entries to 'statement separator blank' rather than GO but because some have GO at the end of the sql script I now get an error. See attached.
SQL Error.jpg
SQL Error.jpg (21.51 KiB) Viewed 5740 times
I guess the answer is to ensure that all of the scripts I am using have GO at the end as the majority have. This is a bit of a nightmare as all of the software has alrady been delivered and therefore means I have to go to the next version just to satisfy the statement separator in the tool.

Regards,
John
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Worrying problem with SQL Scripts

Hi John,

Can you please send us your .AIP (project) file and SQL Script (including database schema) to support at advancedinstaller dot com so we can investigate them?

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Worrying problem with SQL Scripts

I have resolved this issue by simply putting the GO batch separator at the end of all scripts.

John

Return to “Common Problems”