SelectDbDlg DB instance

Jun 21, 2011 at 1:03 AM
Edited Jun 21, 2011 at 1:03 AM

In the SelectDbDlg there is a property for the database name "DATABASE_SERVER", does this include the instance (if there is one) and if it does how could I separate it out in order to use the sqldatabase extension

eg.

  <sql:SqlDatabase Id="SqlDatabase" Database="[DATABASE_NAME]" DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no" CreateOnInstall="yes" ConfirmOverwrite="yes"  Server="[DATABASE_SERVER]" Instance=[?????]  />


I assume this call will fail because the server would also include the instance name

Coordinator
Jun 23, 2011 at 12:36 AM

I don't think there's code to do this. You can use the MSIExt extension to create the database as well.

Jun 23, 2011 at 12:41 AM

sorry where is that one I found

http://code.dblock.org/Source/msiext/1.2/Docs/_sql_server_8h.html#a57f981fc4fcbe36f891c72f18fc71afe

But that seems to be about creating a connection string i think.

Coordinator
Jun 23, 2011 at 12:50 AM

Look at the extensions. MSSQLDatabase is what you want, http://code.dblock.org/Source/msiext/1.2/Docs/class_wix_1_1_extensions_1_1_data_source_1_1_m_s_s_q_l_database.html. There're samples in the download that use those.