The connection string for coded UI Data driven test using excel data source is not working

I am using the visual studio 2012 coded UI test, i added the following connection strings to connect to an excel data source:
[DataSource("System.Data.Odbc", "Dsn=Excel Files;Driver={Microsoft Excel Driver (*.xls)};dbq=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5;readonly=true",
"Sheet1$", DataAccessMethod.Sequential), TestMethod]
[DataSource("System.Data.Odbc", "Dsn=Excel Files;dbq=|DataDirectory|\\Automation data file.xls;defaultdir=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;driverid=1046;maxbuffersize=2048;pagetimeout=5",
"Sheet1$", DataAccessMethod.Sequential), TestMethod]
But i get the following error:
"The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" ( in the MSDN Library.
Error details: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"

Thanks for Adrian's help.
Hi shaza,
From the error message, I suggest you can refer the Adrian's suggestion to check the date source connection string correctly.
In addition, you can refer the following about how to Create a Data-Driven Coded UI Test to check your issue:
Or you can also try to use a Configuration File to Define a Data Source for coded UI test.
For example:
Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\add.xlsx;defaultdir=.;
driverid=790; maxbuffersize=2048; pagetimeout=60;"
connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\sum.xlsx;defaultdir=.;
For more information, please see:
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
HERE to participate the survey.

Similar Messages

  • The Connection String for the Query Log table is automatically encrypted.

    When I try to use the Usage Based Optimization to apply Aggregation Design to my measure group, it shows me the following
    error message.
    The connection string cannot be found. Open Microsoft SQL Server Management Studio and, in the Analysis Server Properties
    page, check the value of the Log\QueryLog\QueryLogConnectionString
    I encountered this error like two weeks ago.  At that time I just reset the connection string and every things seem
    to be fine.  A week ago, I successfully applied the Usage Based Optimization for one of my cubes.  However when I tried to apply UBO for my other cubes today, I encountered the same issue again!  I believe no one has changed the property of
    the connection string.
    Also if I query the Query Log table, I can see those latest queries made by the users.  I'm sure the queries are still
    logging into this table.
    This is really strange.  Anyone else has encountered the same issue?  Thanks.

    Hello Thomas,
    I encounterd this issue. And I am struggling trying to solve this problem. If you have resolved this issue and I guess you must've, because this post is two years old, could you kindly post how you resolved this issue?
    Thanks in advance
    Best Regards,

  • C How to Set Isolation Level in the Connection String

    How to Set Isolation Level in the Connection String using the "Microsoft OLE DB Provider for DB2 Version 4.0"?
    We are trying to move from Crystal Reporting that run against a IBM DB2 database on a mainfram to SSRS reporting and we have downloaded the "Microsoft OLE DB Provider for DB2 Version 4.0" and then worked with the DB2 Administrator to create the
    Packages.  We only have access to use the "Read Uncommitted ("MSUR001") package.   We were able to connect and pull data before he removed access to the other packages, but after setting access the Connection keeps trying to use
    the 'Cursor Stability (MSCS001)" package.   How do we change the Default to the "Read Uncommitted ("MSUR001") package???   Since it is keeps defaulting to the the other package
    we can't connect to do it in the T-SQL query, it has to be set at the Connection String level.

    Hi Dannyboy1263,
    According to your description, you want to set the Transaction Isolation Level in Connection String. Right?
    In Reporting Services, the Connection String for OLE DB Connection can only contains Provider, Data Source and Initial Catalog. There's no property for setting Transaction Isolation Level in the Connection String. Based on my knowledge, we can
    only set the Transaction Isolation Level at Query level or set it by using code (C#, VB, Java...) to call the property of Connection. So unfortunately your requirement can't be achieved currently.
    OLE DB Connection Type (SSRS)
    Data Connections, Data Sources, and Connection Strings in Reporting Services
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Save Query - An error occurred while creating connection strings for the query

    A workbook trying to edit and reload I get the following error "Save Query - An error occurred while creating connection strings for the query" No Power Pivot data model or anything.

    I am getting the same error when editing a Power Query in an Excel spreadsheet. It happens when I change a Group By step to do a Sum instead of Count Rows.

  • Report Designer odbc connection string for data source using a parameter

    I am using stand alone report designer 3 for the present and have a question/problem regarding the odbc connection string for MySQL when setting up the data-source
    I need to be able to enter a parameter which is the database name i.e. BOE-201401 or say BOE-201312 etc  from a list of databases the user can choose from.
    at present the odbc connection string points to BOE-201402
    the connection string is at present  Dsn=Development Server for MYsql;description=MYSQL;server=ldndw01;database=BOE-201402;port=3306
    my parameter has the name BOE_DATABASE
    and in an expression it is  as such
    I want to point the datasource for the report to the parameter value before the user sees the report.

    Hi Leslie,
    Based on your description, we want to design a report with a dynamic DataSource connection string. There are the basic steps below for your reference:
    Create report with static database.
    Change data source to report parameter.
    Send new database connection string as a report parameter. 
    More detail information, please refer to the following blog: Dynamic Database in SSRS 2008.
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • What are the username, password and connect string for Designer 6.1.1?

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    - Server name
    - Filename
    Oracle designer6.1.1
    - Date/Time
    - Browser + Version
    IE 6.0
    - O/S + Version
    Win 98
    - Error Msg
    ORA-12154:TNS:could not resolve service name.
    RME-00220:Fail to connect to repository
    These error messages were shown after I entered system, manager and internal, respectively.

    Hi YungJen Chen,
    There is no general username, password and connect string for
    Designer 6i Release 4.1.1.
    First, you install the client tools using the Installer. See also the
    Designer Installation Guide, Chapter 1, 'Client Side installation'.
    Second, you install the repository into an existing database, using
    the Designer Installation Guide, Chapter 2, 'Server-side installation,
    migration and upgrade'.
    The Installation Guide provides step by step instructions on what
    users you need to create for various purposes. Any database users
    you may need to use such as System or Sys will use the password
    given when you installed the database, or whatever passowrd you
    changed it to since.
    The Installation Guide is available as part of the download, or from
    your Windows Start Menu once the Designer client tools are installed
    or from the Designer Documentation page here on OTN.
    Hope this helps. Regards,
    Dominic Battiston
    Designer/JDeveloper Product Management

  • What is the database string used in the connection box for sybase-merant?

    I am using report wizard of Reports Developer 9 to create report for Sybase database. Assume the Sybase database uses the following setting:
    user: sa
    password: password
    computer IP address:
    computer host name: development
    port number: 2468
    database name: TEST01
    If I use sybase-merant (JDBC Query) as the data connection, I need to input USERNAME, PASSWORD and DATABASE at the Connection Box. What should I input for the DATABASE? I have inputted "sa" as the USERNAME and "password" as the PASSWORD. When I inputted "" as the DATABASE, I got error which indicated the data source cannot be connected. I have also tried ",2468:TEST01", "", ",2468" and "", but none of them worked.
    Thank you.
    - Man Ip

    If you go through the link, mentioned above, an entry is needed to register a JDBC-Driver for your database(sybase).
    Driver entry contains a attibute "connectString", which contain the
    connection syntax to the datbase.
    connectString = "mainProtocol:subProtocol://databaseName"
    mainProtocol and subProtocol part of the connection String are defined in config file and "databaseName" has to be mentioned in JDBC Query Connection Diloag.
    Sample databasename : database:portnumber
    Here database refer to the sybase database user want to connect and portnumber : port on which its running(it will be normally 4100 or 5000).
    Please refer the comments in file ORACLE_HOME/reports/conf/JDBCPDS.CONF for more detail.
    With Regards
    Reports team.

  • Connect String for the front end app to access Lite Database in the Client

    I have been using an app developed in for accessing the Oracle Lite Database from the client machine. Can anyone please help me out how to set the Connect String in the config file of my front end app to access the Oracle Lite Database from my client machine. Do anyone have the syntax of the connect string to access the lite database in client machine.
    Thanks a lot in advance.

    -->Select example
    create or replace procedure get_emp(rc out sys_refcursor)
    open rc for select * from emp;
    -->DML example
    create or replace procedure do_dml_emp(pempid in number,
    pempname varchar2,
    result out number)
    insert into emp(empid,empname) values(pempid,pempname) returning empid into result;
    when others then
    -->DDL example
    create or replace procedure ddl_emp(colname varchar2,
    coltype varchar2,
    result out number)
    execute immediate 'alter table emp add column ' || colname || ' ' || coltype ;

  • What are the username, password, and connect string for Designer6i R4.1.1

    As the title, I tried system, manager and internal.
    But it did not work out.
    Thank you for your help.

    Hi YungJen Chen,
    There is no general username, password and connect string for
    Designer 6i Release 4.1.1.
    First, you install the client tools using the Installer. See also the
    Designer Installation Guide, Chapter 1, 'Client Side installation'.
    Second, you install the repository into an existing database, using
    the Designer Installation Guide, Chapter 2, 'Server-side installation,
    migration and upgrade'.
    The Installation Guide provides step by step instructions on what
    users you need to create for various purposes. Any database users
    you may need to use such as System or Sys will use the password
    given when you installed the database, or whatever passowrd you
    changed it to since.
    The Installation Guide is available as part of the download, or from
    your Windows Start Menu once the Designer client tools are installed
    or from the Designer Documentation page here on OTN.
    Hope this helps. Regards,
    Dominic Battiston
    Designer/JDeveloper Product Management

  • Configuration.SectionInformation.ProtectSection generates two connection strings for one

    I am trying to encrypt the connection string section in the config file. There is only one connection string in the original config file, that is a oracle connection string. But after encryption, there are two connection strings.
    The original config file is like
    <?xml version="1.0" encoding="utf-8" ?>
      <add name="Ref_ConnectionString"
       connectionString="Data Source=aaa;User ID=bbb;password=ccc"
       providerName="System.Data.OracleClient" />
      <add key="sp_AddRefName" value="sp_AddRef"/>
    The coding to encrypt is like:
    System.Configuration.Configuration config =
    ConfigurationSection section = (ConfigurationSection)config.GetSection("connectionStrings");
    section.SectionInformation.ForceSave = true;
    And I am using the following coding to test the decryption:
    System.Configuration.Configuration config =
    ConnectionStringsSection connSection = config.ConnectionStrings;
    int i = 1;
    foreach (ConnectionStringSettings settings in connSection.ConnectionStrings)
    Console.WriteLine(i.ToString() + ":" + settings.ProviderName + ";" + settings.ConnectionString);
    The output for the decryption are as following:
    1: System.Data.SqlClient;data source=.\SQLEXPRESS;Integrated Security=SSPI;Attach
    DBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
    2: System.Data.OracleClient;Data Source=aaa;User ID=bbb;password=ccc
    Could any of you tell me what I am doing wrong? Thanks.

    For the benefit of anyone who comes across this question:
    configFile, is meant to be the exePath. OpenExeConfiguration will open the exe's config file and then encrypt it, and then save a "{exePath}.config" file.
    If you use notepad to check then you will see encrypted strings.
    If you want to use code to check use:
    System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
    If you use code to read the config file, then that will only show decrypted values (#2 in the listed output)
    The extra data connection (#1) comes from a config file higher up in the hierachy, e.g. machine.config

  • Can't change the connection string of SSIS package with derived columns?

    We upgraded SQL server 2008 to 2012, copied and converted all SSIS packages from Visual Studio 2008 to 2010.  When I opened a package in VS 2010 and tried to change the connection string, in the local connection managers, if the data source is another
    SSIS package B(.dtsx file) with derived columns, I can't change the connection string of package B. When I opened the file connection manager editor for package B and tried to locate a dtsx file in another location, saved the change, reopened the project.
    Package B still pointed to previous file.  Other packages without derived columns work fine. Any thoughts?

    We are using the package deployment model and refer to other packages in the same project. If
    we changed the path of package B (with derived columns) to "D:\Visual Studio 2010\xxxx", and refer it in package A, in the A's connection manager, the connection string of package B is still its previous location  "D:\Visual
    Studio 2008\xxxx". When we ran the package A in the SQL server agent, the data source is still
    Studio 2008\xxxx", so how can I change it to "D:\Visual
    Studio 2010\xxxx"? Why has the package C (without derived columns) no such problem? thanks.

  • How to determine the connection string to a SQLite database, in C# code

    Hello. I'm trying to figure out how to specify the connection string to a SQLite database, I would like to access using the following code:
    string connectionString = null;
    SqlConnection connection;
    SqlCommand command;
    SqlDataAdapter adapter = new SqlDataAdapter();
    DataSet ds1 = new DataSet();
    string sql = "SELECT DataName, Data, Id, UserId, DateLastUpdated FROM MainTable";
    connectionString = "Data Source=C:\\SQLITEDATABASES\\SQLITEDB1.sqlite;Version=3;";
    connection = new SqlConnection(connectionString);
    command = new SqlCommand(sql, connection);
    The value I assigned to the variable connectionString, in the code above, I obtained somewhere from the Internet. It does not work. I'm using Visual Studio 2013, against the file sqlite-netFx451-setup-bundle-x86-2013-, which
    I installed, and got from
    My application's App.config file looks as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <add name="DC_Password_Saver.Properties.Settings.DC_Password_SaverConnectionString" connectionString="data source=&quot;C:\Users\patmo_000\Documents\Visual Studio 2013\Projects\DC Password Saver\DC Password Saver\DC Password Saver.db&quot;" providerName="System.Data.SQLite.EF6"/>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
    I tried to use the value assigned to connectionString in the XML settings above, replacing single backslash characters with double backslash characters, because the Visual Studio editor flagged them as unrecognizable, and wound up with the
    SqlDataAdapter adapter = new SqlDataAdapter();
    DataSet ds1 = new DataSet();
    string sql = "SELECT DataName, Data, Id, UserId, DateLastUpdated FROM MainTable";
    connectionString = "data source=&quot;C:\\Users\\patmo_000\\Documents\\Visual Studio 2013\\Projects\\DC Password Saver\\DC Password Saver\\DC Password Saver.db&quot;";
    connection = new SqlConnection(connectionString);
    The above code however does not work either. So again, does anyone know how I can specify in C# code, a connection string to access my SQLite database? Thanks in advance for your reply.

    What does SQLite connection strings has to do with WPF?
    You will find some valid connection strings here:
    But you cannot use the SqlConnection class to connect to a SQLite database. You will need to download and add a reference to the System.Data.SQLite library and then use the SQLiteConnection class:
    connection = new System.Data.SQLite.SQLiteConnection(connectionString);
    command = new System.Data.SQLite.SQLiteCommand(sql, connection);
    Please refer to the following article for more information and an example of how to connect and read and write data from an SQLite database using C#:
    There is contains a link where you can download the required assemblies.
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread in an approproate forum if you have a new question.

  • Data Driven Test doesn't work in coded UI

    I have written my first coded ui data driven test (Visual Studio 2012).  Although the test ran and was marked passed. I don't think it actually did anything.  
    I have 2 fields (Input and Output) on my csv file.
    n my app,  I want to enter the input field in a field called GoTo which is an UITbedit field, hit enter.  This should open another window where I want to validate the window title = to my Output 
    Here is my code
            [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Data/MainData.csv", "MainData#csv", DataAccessMethod.Sequential), DeploymentItem("MainData.csv"), TestMethod]
            public void DataDrivenTest()
                //string paramVal = TestContext.DataRow["Input"];
                this.UIMap.EnterGoToValueMainParams.TextInputEditText =
                this.UIMap.AssertWindowTitleExpectedValues.TextOutputEditText =
    During playback, it appeared that the coded ui test had looped through the csv file, but it didn't actually write anything to the edit field that I was testing.

    It still doesn't work,
    I modified my code as follows:
                this.UIMap.EnterGoToValueMainParams.TextInputEditText =
                this.UIMap.AssertWindowTitleExpectedValues.TextOutputEditText =
    The application appears to loop through the file, but it is placing my original entered test "1" in the edit field during both iterations.  The playback is slow enough that I can see what is being entered. It doesn't seem to be replacing the
    "1" with a "5" from my input file.

  • How to set ApplicationIntent=ReadOnly in Connection String for SharePoint 2013

    SharePoint 2013 and SQL Server 2012 allows us some additional options to create HA and DR sites through AlwaysOn Availablibity Groups and Listeners.  Problem that I'm having is that I have a DR site that is at a different location.  Microsoft
    recommends not to stretch the farm across different locations, so I've created a separate farm for DR.  I have my content database in an Availability Group so that is Asynchronously commits data changes across the 2 locations.  My DR site
    connects to the content database through a Listener. 
    Since the DR site is connecting to the content database through the Listener, it is connecting the primary replica.  In order to connect to the Read Only secondary replica, I need to add "ApplicationIntent=ReadOnly"
    to the connection string.  How do you do that?

    It supports a secondary being Readable, that is all it is telling you. It does not support, nor implement, Read-Intent. This is expected behavior. You can look at the Conn Strings via PowerShell, of course:
    $db = get-spdatabase | where {$_.TypeName -like "*Config*"}
    Data Source=SPSQL;Initial Catalog=Config;Integrated Security=True;Enlist=False;
    Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to get the connection string at runtime

    I'm using Forms6i.
    I'm using EXEC_SQL to execute a dynamic sql in my form.
    I need connection string for that . But i cannot give it hardcodingly.
    Is there any form's properties to get the database connection string, to which the form is connected ?

    I've the user i/p columns
    EmpNo, Dept ,Holicode and , From and To Date.
    In which From and To Date is mandatory.
    In one table, emp_cal_header, i have all the holidays defined for each of the employees for a year.
    The records like
    EmpNo    Holicode     Holidt
    001        Frioff         02/07/2011
    001        Satoff        03/07/2011
    001        Frioff         08/07/2011
    .....So i want the final o/p in Excel like
    If user i/p is from Date: 01/07/2011 ,ToDate:09/07/2011, EmpNo :001
    EmpNo   Dept     Total  01/07/2011   02/07/2011 ..... 08/07/2011  09/07/2011
    001        IT        3               FriOff           Frioff            For this i'm constructing a dynamic sql like this
         qry := '(Select ech_emp_code cal_emp_code,emp_name CAL_EMP_NAME,emp_dept CAL_EMP_DEPT,count(ech_date) CAL_TOTAL'||date_cols||'
                             from (Select ech_emp_code,em.emp_name||'' ''||em.emp_middle_name||'' ''||em.emp_last_name emp_name,em.emp_dept emp_dept,ech_code,ech_desc,ech_date
                                            from emp_cal_header ,employee_master em
                                where emp_cal_header.ech_emp_code = em.emp_code
                                and  ech_emp_code = '||nvl(:emp_code,'ech_emp_code')
                                ||' and em.emp_status IN (''P'',''C'')'
                                ||' and em.emp_dept = '||dep
                                ||' and ech_date between '''||to_date(to_char(:From_dt,'DD-MON-YYYY'))
                                ||''' and '''  ||to_date(to_char(:To_dt,'DD-MON-YYYY'))
                                ||''' and ech_code = '||holi
                                ||' order by ech_Date)
                 group by ech_emp_code,emp_name,emp_dept)';
    and date_cols is constructed as
         todt := :from_dt ;
         i := 0;
              i := i+1;
              dt  := to_char(todt,'dd-MON-YYYY');
              date_cols     := date_cols||','||'max(decode(to_char(ech_date,''dd-MON-YYYY''),'''||dt||''',ech_CODE)) DT'||i;
              todt := todt + 1;
              Exit when todt > :to_dt ;
         End loop;This query i'm executing using EXEC_SQL.
    Since date_cols can be constructed only based on user i/p , i'm not able to do just a normal query
    Any help

Maybe you are looking for

  • How do I rename more than one file at a time within a folder?

    I am new to OSX. I am looking to rename a batch of .jpg files but I can't figure out how to rename all files within a folder? I looked for help and apple help only describes how to rename a single file?  please see the attrached link for more infomat


    Hello, I want to change the default language for Oracle Bea Web Logic 11G ( Can anyone tell me in what opcion can i do it? Thanks in advance. Regards,

  • Java noob needing help - First applet won't compile

    I'm trying to make a simple audio player applet for a web page. The basic way it works is: There are four buttons Play 1, Play 2, Play 3 and Stop, as well as a label for applet credits, a label for music credits and a label for the applet's current s

  • Inconsistency in table cell design binding

    Hi All, I have a strange issue. I have a table in which i am coloring the cells based on certain condition. Upon execution of a method , the color should change. However color changes sometimes and sometimes it does not happen. For the times it doesn

  • Tab controls

    I have a program with 3 tabs using tab control. The first tab is a login screen (because this will be used for remote fron panel use), the next is a configuration tab and the last is the execution. The login tab is an event structure waiting for a va