You can always find up to date documentation with your WiX install, under
doc\WiX.chm. WiX repurposes the Property element to define properties of the
ODBC data source. There is no complete reference in WiX's documentation
because the list of properties supported is defined by the ODBC driver in
use, not by WiX. See the SQL Server documentation for the properties
supported by SQL Server's ODBC driver.

 

It may be simplest to create a File DSN with the ODBC Data Sources
administrative tool, then open that in a text editor. You can then copy all
of the settings to <Property> elements. For example, I just created one to
connect to my local SQL Server instance that looks like this:

 

[ODBC]

DRIVER=SQL Server

UID=Mike

Trusted_Connection=Yes

LANGUAGE=British

DATABASE=mydb

WSID=MYPC

APP=Microsoft Data Access Components

SERVER=MYPC

 

So you'd set

 

<Property Id="UID" Value="Mike" />

<Property Id="Trusted_Connection" Value="Yes" />

<Property Id="LANGUAGE" Value="British" />

<Property Id="DATABASE" Value="mydb" />

<Property Id="WSID" Value="MYPC" />

<Property Id="APP" Value="Microsoft Data Access Components" />

<Property Id="SERVER" Value="MYPC" />

 

(You probably want to change APP to something to represent your application
- this will appear in SQL Server's list of connections.)

 

-- 

Mike Dimmick

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rhys Goodwin
Sent: 05 July 2007 07:10
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] ODBC Data source

 

Hi, 

I'd like to create a very simple MSI that installs (configures) a system SQL
DSN. I found this snippet in the mailing list archives which seems to work
ok but I think there should be a lot more properties that could be
configured. I can't seem to find a full WIX syntax reference. I looked at
the schema on the WIX website but I couldn't find "Server" property as used
below in the snippet. 

The below snippet works "ok" in that it adds the data source with the
specified parameters but it configures the datasource to use SQL
authentication rather than NT.

I would have thought it would be possible to specify all the possible
options for creating a datasource. i.e. all the options you get when you go.
Start>Control Panel>Administrative Tools>ODBC Data Sources>Add> select
driver, server name, description, authentication mode, username, password,
database, etc etc and whole bunch of other options. 

Hope this makes sense. 

Cheers,
Rhys



<Wix xmlns=" <http://schemas.microsoft.com/wix/2003/01/wi%22> 
http://schemas.microsoft.com/wix/2003/01/wi
<http://schemas.microsoft.com/wix/2003/01/wi%22> ";>





     <Product Id="E9CB077F-7E94-491A-9111-69F72D09B354"


              UpgradeCode="365A4ECE-9620-4780-BCF8-4FE885A09466"


                 Name="Fecas ODBC Connection" Language="1033" Version="



1.0"


              Manufacturer="My Co">


         <Package Id="2E2EA049-BE49-4C59-AB15-0697C0090A1F"


                     Description="Creates System DSN for FECAS on SERVER"






                     Comments="Creates System DSN for FECAS on SERVER"


                  Manufacturer="My Co" InstallerVersion="200"


                  Compressed="yes" />






         <Media Id="1" Cabinet="Data1.cab" EmbedCab="yes" />


         <Directory Id="TARGETDIR" Name="SourceDir">


             <Directory Id="ProgramFilesFolder" Name="progfils"






                        LongName="ProgramFilesDir">


                 <Component Id="MainComponent" Guid="" DiskId="1">


                     <ODBCDataSource Id="



odbc.fecas" Name="fecas"


                                      Registration="machine"


                                         DriverName="SQL Server" >


                         <Property Id="Server" Value="SERVER" />






                         <Property Id="Database" Value="fecas" />


                         <Property Id="Description"


                                   Value="[EMAIL PROTECTED]" >






                     </ODBCDataSource>


                 </Component>


             </Directory>


         </Directory>


         <Feature Id="MainFeature" Title="TheODBCDSN" Level="1">






             <ComponentRef Id="MainComponent" />


         </Feature>


     </Product>


</Wix>







 

-------------------------------------------------------------------------
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

Reply via email to