none
The specified DSN contains an architecture mismatch between the Driver and Application

    Question

  • I have a Coded UI script in an app server, and it's connected in excel 2010 to get data but I have this kind of error:

    Message:

    The unit test adapter failed to connect to the data source or to read the data. For more information on "Troubleshooting Data-Driven Unit Tests" (https://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.

    Error Details:

    ERROR [IM014] [Microsoft] [ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application.

    I'm using VS2012.

    Friday, May 24, 2013 6:57 AM

Answers

  • Hello,

    Thank you for your post.

    Would you mind providing us the content of Data Source Attribute in your coded UI test so that we can further look at this issue?

    Please make sure the Data Source attribute is like this:

    DataSource("System.Data.Odbc", "Dsn=Excel Files;Driver={Microsoft Excel Driver (*.xls)};dbq=|DataDirectory|\\Data.xls;defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5;readonly=true", "Sheet1$", DataAccessMethod.Sequential), TestMethod]

    If the Excel file is not in the project directory, please try putting it in project directory and set ‘Copy to Output Directory’ to ‘Copy Always’ to check the result.

    Based on the ODBC Driver error, it seems the issue is related to the driver and application mismatch.

    Please refer to Chirag’s answer in this thread with the same error:

    http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/702f0d9b-6cb9-49cf-9953-80d059711e60

    Note that except Excel file, you also can use XML/CSV file as data source.

    For more information, see: How to: Create a Data-Driven Coded UI Test

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 27, 2013 6:44 AM

All replies

  • Hello,

    Thank you for your post.

    Would you mind providing us the content of Data Source Attribute in your coded UI test so that we can further look at this issue?

    Please make sure the Data Source attribute is like this:

    DataSource("System.Data.Odbc", "Dsn=Excel Files;Driver={Microsoft Excel Driver (*.xls)};dbq=|DataDirectory|\\Data.xls;defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5;readonly=true", "Sheet1$", DataAccessMethod.Sequential), TestMethod]

    If the Excel file is not in the project directory, please try putting it in project directory and set ‘Copy to Output Directory’ to ‘Copy Always’ to check the result.

    Based on the ODBC Driver error, it seems the issue is related to the driver and application mismatch.

    Please refer to Chirag’s answer in this thread with the same error:

    http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/702f0d9b-6cb9-49cf-9953-80d059711e60

    Note that except Excel file, you also can use XML/CSV file as data source.

    For more information, see: How to: Create a Data-Driven Coded UI Test

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 27, 2013 6:44 AM
  • Hello,

    Since we haven't heard from you for some time, I temporarily close this case. I mark useful reply as answer. If you have any concerns, please feel free to unmark it to reopen it or submit a new question.

    Thanks for your understanding.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 31, 2013 1:33 AM