This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: SQL behaviour during upgrade and uninstall
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 11, 2008
10:37 AM
SQL behaviour during upgrade and uninstall
My MSI-Package rolls out a new database on install. So far, so good.
How do I uninstall it now depending on the database name the user entered? At the moment I use hard coded
And how to realize a minor upgrade? The upgrade package should as far as I know offer the possibility to install or upgrade the product. But in these cases I need two different SQLs and I don't find any switch for execution on upgrade...
How do I uninstall it now depending on the database name the user entered? At the moment I use hard coded
DROP DATABASEbut even this doesn't work...
And how to realize a minor upgrade? The upgrade package should as far as I know offer the possibility to install or upgrade the product. But in these cases I need two different SQLs and I don't find any switch for execution on upgrade...
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 11, 2008
02:40 PM
You need to have the following text replacement entry for your SQL script file:
Find What:
Replace With: [DBNAMETODELETE]
DBNAMETODELETE is a Windows Installer property where stores a database name your end user provides.
Also, in order to determine an install or upgrade, you may want to check if the Installed and REINSTALL properties are set.
Hope that helps.
Find What:
Replace With: [DBNAMETODELETE]
DBNAMETODELETE is a Windows Installer property where stores a database name your end user provides.
Also, in order to determine an install or upgrade, you may want to check if the Installed and REINSTALL properties are set.
Hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2008
04:31 AM
Hi hidenori,
thx for your reply, but it doesn't seem to help.
AT SQL Scripts, I added a new connection and underneath it two scripts. First one runs during installation and creates my database structure. Second one runs only during deinstallation:
Unfortunately the database is still there after removing my software.
edit: I tried IS_SQLSERVER_DATABASE instead of DBNAMETODELETE but I still doesn't work 😞
thx for your reply, but it doesn't seem to help.
AT SQL Scripts, I added a new connection and underneath it two scripts. First one runs during installation and creates my database structure. Second one runs only during deinstallation:
DROP DATABSE [DBNAMETODELETE]
Unfortunately the database is still there after removing my software.
edit: I tried IS_SQLSERVER_DATABASE instead of DBNAMETODELETE but I still doesn't work 😞
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2008
09:50 AM
What I suggested was that you would need to add a text replacement item for your script using the Text Replacement tab in the SQL Scripts view. You still need to use the following statement, and will be replaced with the value of the DBNAMETODELETE property by the InstallShield runtime.
DROP DATABASE
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 02, 2009
04:02 AM
USE masterresolved the problem.