How to execute sql files in patch. - 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!

viral
Posts: 22
Joined: Thu Jun 23, 2011 9:07 am

How to execute sql files in patch.

Hello,

I have created an installer with new version and added a sql file and few files in it. Now after creating patch. when i run this patch , it updates and adds new files but
it's not executing sql files.

Please guide me through the steps for how to execute sql files in patch.


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

Re: How to execute sql files in patch.

Hello,

Here is similar thread that debates this issue.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
viral
Posts: 22
Joined: Thu Jun 23, 2011 9:07 am

Re: How to execute sql files in patch.

Hi Mihahi,

Thanks for your reply. I already have checked this post before asking question in forum.

Let me explain what my installer do.

When my main installer runs, it asks user to enter Server name, username, password and database name. Based on user input, my installer will create database on server.

Now when my patch installer runs, it is not asking for server name, database name, user name and password to run SQL script.

So now my question is how patch installer will know SQL server connection information and database name to run DB update sql script.

For now when my patch installer runs, it only copies the new files to installation folder but it is not executing SQL script.

Can you please help me to solve this issue

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

Re: How to execute sql files in patch.

Hello,

To get the connection string properties from user input during the patch installation, you can try to add a custom dialog that sets those public properties in the Patch dialog tree from the Dialogs page.

However, since a patch requires the previous installation on the target machine you can perhaps automate this by saving the connection string values. You can save them for example in a registry location during the full installation of your application and then get them in the patch installation using searches.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
viral
Posts: 22
Joined: Thu Jun 23, 2011 9:07 am

Re: How to execute sql files in patch.

Hello Mihai,

Thanks for your response. As per your suggestion, I have stored Connection string in registry and then used it using searches for patch. But still i am not able to execute sql scripts in patch. Can you please further elaborate on how to assign this connection string on the sql file need to be executed for patch ?


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

Re: How to execute sql files in patch.

Hello Viral,

Can you please send us the .AIPs (previous version, new version and patch project) to support at advancedinstaller dot com so we can investigate them?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”