Hi,

I keep getting an error message during the installation:
Error configuring ODBC data source: MyDSN, ODBC error 11: Driver's ConfigDSN, 
ConfigDriver, or ConfigTranslator failed. Verify that the file MyDSN exists and 
that you can access it.

There are 3 buttons on the message box: Cancel, Retry, and Ignore. If I select 
Ignore then the installation is finishing successfully. The ODBC DataSource is 
created as well and it can connect to the Database. So everything works fine. 
Then why do I get this error message?

I cannot release the installer with this annoying error to the customers. I 
must get rid of it! Any help would be greatly appreciated!

Details:
The installer creates the ODBC DataSource like the following:

<Component Id='OracleODBCDataSourceComp' Guid='GUID'>
        <ODBCDataSource Id='OracleODBCDataSource' Name='MyDSN' 
Registration='machine'
                                     DriverName='[ORACLEODBCDRIVER]'>
            <Property Id="Server" Value="[TNS]" />
        </ODBCDataSource>
</Component>

I know that ODBCDataSource/@DriverName is not formatted string, so I also 
update the ODBCDataSource table via a C# CustomAction:

[CustomAction]
private static void UpdateODBCDataSourceTable(Session session)
        {
            session.Log("Opening view");
            View lView = session.Database.OpenView("DELETE FROM ODBCDataSource 
WHERE ODBCDataSource.DataSource='OracleODBCDataSource'");
             lView.Execute();

            lView = session.Database.OpenView("SELECT * FROM ODBCDataSource");
            lView.Execute();

            try
            {
                Record lRecord = session.Database.CreateRecord(5);
                lRecord.SetString(1, 'OracleODBCDataSource');                   
 //DataSource
                lRecord.SetString(2, 'OracleODBCDataSourceComp');        
//Component
                lRecord.SetString(3, 'MyDSN');                                  
                   //Description
                lRecord.SetString(4, session["ORACLEODBCDRIVER"]);     
//DriverDescription
                lRecord.SetInteger(5, 0);                                       
                          //Registration: 0 means System DSN

                lView.Modify(ViewModifyMode.InsertTemporary, lRecord);
            }
            catch (Exception ex)
            {
                session.Log(ex.Message);
            }

            lView.Close();

            session.Log("Closing view");
            lView.Close();
        }

The ORACLEODBCDRIVER property is set by the user during the installation.

The related part of the log:
Action 7:21:28: InstallODBC. Installing ODBC components
1: Oracle in OraDb11g_home1 2:  3: 4 4: DSN 5: MyDSN 6: Server 7: MyTNS
Error 1919. Error configuring ODBC data source: MyDSN, ODBC error 11: Driver's 
ConfigDSN, ConfigDriver, or ConfigTranslator failed. Verify that the file MyDSN 
exists and that you can access it.

Thank you in advance.
Regards,
Adam Wittek
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to