Hi all,
As a temporary solution for convenience of developing/testing very early
product regardless of best practice, I would like to drop a specific database
if it exists already before creating it. So I have something like below, but it
seems like it isn't dropping the database and it just fail if the DB exists
already because the sql script has some assumption that DB is clean.
<Component Id='RepositoryComponent'
Guid='9AB316AF-5B5C-40F9-8904-6DFE4894C76F'>
<SqlDatabase Id='Repository'
Database='Repository'
Server='[SQLSERVER]'
Instance='[SQLINSTANCE]'
DropOnInstall='yes'
CreateOnInstall='yes'
DropOnUninstall='yes'>
<SqlScript Id='RepositorySchema'
ExecuteOnInstall='yes'
Sequence='2'>
<Binary Id='Configuration_Scheme.sql'
SourceFile='Configuration_Schema.sql'/>
</SqlScript>
<SqlScript Id='ReposotiryLogic'
ExecuteOnInstall='yes'
Sequence='3'>
<Binary Id='Configuration_Logic.sql'
SourceFile='Configuration_Logic.sql'/>
</SqlScript>
</SqlDatabase>
</Component>
I also tried to having <SqlDatabase> nested at <Product> element and have
reference to 'master' database and then tried running <SqlString> nested under
<Ccomponent> element to run "IF EXIST ... DROP DATABASE", but it seems like the
string is never executed.
BTW I'm using WiX v2 now and have plan for moving to WiX v3 and this is my
first WiX project.
Thanks,
Sunghwa
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users