I am working on a install app that needs to install/update a db.

The system will need to install/upgrade the database. 

The first time i will need to create db (with one or more sql files),
Each time after that I will need to issue one or more scripts based on the
current version of the db.


I see how to use sqldatabase and sql script to create and upgrade the dbs.
But it just looks so complicated.

I will need two sqldatabase commands, one with integrated security one
without. 
For each of the sqldatabase command i will have one of more scripts per
version. Each file needs some check that will check the db version and only
run if needed. ( This also includes some special work so that x.x.x as a
version will be understood in the db )

I was thinking, 

Could i do all of this easier with a custom action. 

Yes I understand that it would be a little more work to begin with, but it
seems to me it may be easier to maintain over the long term.

I was thinking of a simple custom dll that will 
use "create database" to create the db on the server
backup my db before the install
get the db version and execute embedded sql scripts to bring it up to date

I may be shooting myself in the foot. But I am interested in knowing the
benefits/drawbacks to this approach.

The biggest advantage I see is that the code will be easier to read ( not
multiple xml components )
It will be easier to follow, since it seems this is more suited to a program
centric approach rather than a msi/database approach.
Easy to debug because i could run it without runnning the installer. 

The biggest disadvantages i see, is I will be wrapping my own sql connection
stuff which bypasses the tested sqldatabase/util msi code
and i will have to change my custom action every rebuild.

Please give me some wisdom here.

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/db-install-thoughts-tp5016287p5016287.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to