Hi,

Our package creates a database during installation and we only want to drop
the database during uninstall when the PROPERTIES DROPDB="1".

What i did was i've created a component:
<Component Id="createDB" Guid="8D0757C0-B204-4A99-8FA1-4F3235FA2CAF">
        <CreateFolder Directory="INSTALLDIR" />
        <sql:SqlDatabase Id="createSqlDB" CreateOnInstall="yes"
Server="[SQLSERVER_SERVER]" Database="[SQLSERVER_DATABASE]">
                <sql:SqlScript Id="createScript" ExecuteOnInstall="yes"
ContinueOnError="no" BinaryKey="create_DB.sql"/>
        </sql:SqlDatabase>
</Component>

And then i created another database for dropping the database:
<Component Id="dropDB" Guid="D32A0748-A505-45B4-B419-BF21C71FF0B6">
        <CreateFolder Directory="INSTALLDIR" />
        <sql:SqlDatabase Id="dropSqlDB" DropOnUninstall="yes"
Server="[SQLSERVER_SERVER]" Database="[SQLSERVER_DATABASE]" />
        <Condition><![CDATA[DROPDB="1"]]></Condition>
</Component>

What is the right way to do this? All we want is drop the database on
uninstall only if DROPDB="1". Thank you in advance.

Regards,
Romeo
-- 
View this message in context: 
http://n2.nabble.com/Drop-SQL-Server-database-during-uninstall-tp1097944p1097944.html
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to