Reputation: 375
I'm creating a plugin for an existing application and I need to add a table to the database this application is using (MSSQL-database). The problem is that I can't find any tutorial or documentation about how to do this with wix. I use msiext for the UI to retrieve the database server and the credentials to access and execute operations on the database.
I hope you can help me and if you need any additional information please ask me.
Upvotes: 0
Views: 307
Reputation: 375
Well eventhough it is not the most beautifull solution i managed to get it working with an sql script tag like:
<sql:SqlScript Id='CreateTable' BinaryKey='CreateTable' ExecuteOnInstall='yes' />
and it creates my table.
Upvotes: 0
Reputation: 62157
It is not in because it is a VERY bad idea to manipulate a database in the installer - which my and should normally not execute with permissions in the database.
You are a lot better off to follow best practices and handle database maintenance outside the application installation, as every other commercial application I have ever seen does. Generally DB updates and application updates are and should be separate.
If you HAVE To do it - execute a custom action.
Upvotes: 1