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 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.
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.
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 ?
FOLLOW US
Get the latest news in Application Packaging