I have the following piece of code in my wxs file for DB.
<Binary Id="binCreateTbl" SourceFile="CREATE_TABLE.sql" />
<sql:SqlScript BinaryKey="binCreateTbl" Id="script_CreateTbl" ExecuteOnInstall="yes" Sequence="2"/>
<sql:SqlScript BinaryKey="binCreateTbl" Id="script_CreateTbl1" RollbackOnUninstall="yes" Sequence="1" />
The Create_Table.sql just contains a create table statement with just two simple columns namely ID and Name. When installing the MSI, the table is getting created in the DB, but while uninstalling, the table is not getting removed / dropped. Any idea how to achieve this? I know that including the following piece of code instead of the line with RollbackOnUninstall=yes, then it works. But I want to avoid it. Please help.
<Binary Id="binDropTbl" SourceFile="DROP_TABLE.sql" />
<sql:SqlScript BinaryKey="binDropTbl" Id="script_DropTbl" ExecuteOnUninstall="yes" />