Rendered property equal result of method call ? Can it be done

Hi Guys
Is it possible to set the rendered property to the result of a method call.
So for example I have an Input Text Item and I want to turn it on or off depending on whether the value of the date selected is a saturday.
I was hoping to add a method to the backing bean called boolean isSaturday() and use the result of that on the Rendered property.
Does anyone know if this is possible and provide an example of the EL syntax required to perform this function.
Thanks in advance
Kris

Hi Kris,
off course this is possible using Expression Language. Mention following condition in the rendered attribute of a (Faces) UI component and the method (getter) in the backing bean:
rendered="#{userInfo.admin}" UserInfo class:
    private boolean admin = false;
    public void setAdmin(boolean admin) {
     this.admin = admin;
    public boolean isAdmin() {
     return admin;
    }The component will render depending on the value of the admin variable.
Regards,
Koen Verhulst

Similar Messages

  • Method calling

    Hello,
    I have a problem in calling a method in say ClassA from ClassB. In my scenario, ClassA knows the name of the calling class, namely ClassB as it has been stored only as a string variable.
    So, In ClassA, I have a declaration statement like
    String name=classB;
    And I also know the method in classB to be called, say classB.run( ). But, I cant create an object of classB and call its method directly from classA, as I have the classname (classB) only as a value of string variable in classA. This is because, the classname (classB) is known only during runtime, thatis in my case, the classname is a value of an attribute in a xml file that is collected during parsing and rendering stage.
    So, can anyone please guide to further proceed with my work.
    Thank you,
    Shiv.

    You can use the reflection API for this:
         * Instantiate Java object from a class by calling the constructor that matches the given parameters.
         * @param className
         * @param classes Constructor parameter types (class names).
         * @param values Constructor parameter values.
         * @return Java object.
         * @throws ClassNotFoundException if class can't be found in classpath.
         * @throws NoSuchMethodException if there's no constructor with the given types.
         * @throws InvocationTargetException if the constructor throws an exception.
         * @throws IllegalAccessException if access to the constructor is denied.
         * @throws InstantiationException if the class is abstract and therefore can't be instantiated.
         * @since 1.8.3
        static public Object getInstance(String className, Class[] classes, Object[] values) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
            Object result = null;
            if (className != null) {
                Class c = Class.forName(className);
                if (classes != null && values != null) { //constructor with arguments:
                    Constructor cc = c.getConstructor(classes);
                    result = cc.newInstance((Object[]) values);
                } else { //empty constructor:
                    result = c.newInstance();
            }//else: input unavailable
            return result;
        }//getInstance()
         * Call a (non-static) Java method.
         * @param instance Java object created via the instantiate() method.
         * @param methodName Name of instance method.
         * @param classes Optional method parameter types.
         * @param values Optional method parameter values.
         * @return Result of method call.
         * @throws ClassNotFoundException if parameter type can't be found in classpath.
         * @throws NoSuchMethodException if <i>methodName</i> is invalid.
         * @throws InvocationTargetException if the method throws an exception.
         * @throws IllegalAccessException if access to the method is denied.
         * @since 1.8.3
        static public Object call(Object instance, String methodName,  Class[] classes, Object[] values) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
            Object result = null;
            if (instance != null && methodName != null) {
                Method method = instance.getClass().getMethod(methodName, classes);
                result = method.invoke(instance, (Object[]) values);
            }//else: input unavailable
            return result;
        }//call()

  • Rendered Property calling managed bean Multiple Times

    Hi
    We have a problem within a command button in a jspx, which includes a rendered tag which references a managed bean method via EL.
    e.g.
    rendered="#{PERUserInfo.trainee}"
    When I debug the jspx, the PERUserInfo.trainee method is called 4 times instead of once.
    We have noticed similar findings when using managed bean methods via the rendered property. i.e. calls getters multiple times.
    Any idea why this is happening?
    We are using JDeveloper v10.1.3, JHS v10.1.3 SU1.
    All comments appreciated.
    Cheers
    Denis

    Denis,
    There can be many reasons why your bean method is called multiple times; but I would consider this perfectly normal in any JSF application considering all the lifecycles and (possible) Partial Page Rendering that happens.
    The question is, by the way, more appropriate on the JDeveloper forum since it is not directly related to JHeadstart itself.
    Hope this helps,
    Evert-Jan de Bruin

  • In a call method, I can make an IMPORT?

    In a call method, I can make an IMPORT?
    thanks!!

    You can import, export parameters using call method.
    check out this example.
    DATA : w_num1 type i value 5,
           w_num3 type i value 7,
           w_num4 type i.
    CLASS c1 DEFINITION.
    PUBLIC SECTION.
      METHODS : m1
                   IMPORTING num1 TYPE i
                   EXPORTING num4 TYPE i
                   CHANGING  num3 type i.
    ENDCLASS.
    CLASS c1 IMPLEMENTATION.
    method m1.
      num3 = num3 * 2.
      num4 = ( num1 + num3 ) ** 2.
    endmethod.
    ENDCLASS.
    START-OF-SELECTION.
    DATA : oref1 TYPE REF TO c1 .
    CREATE OBJECT : oref1.
    CALL METHOD oref1->m1 EXPORTING num1 = w_num1
                          IMPORTING num4 = w_num4
                          CHANGING  num3 = w_num3.
    Write:/5 w_num1 , w_num3 , w_num4 .
    This might help you.
    Regards,
    Sailaja.

  • After rendering method call

    In a page I have an inline frame that is not displayed when the page is loaded (mybean.rendered returns false):
            <af:panelGroupLayout id="pg1" layout="scroll" rendered="#{mybean.rendered}">
                <f:verbatim>
                    <iframe width="420" height="315"
                            src="http://myservlet"
                            frameborder="0" allowfullscreen=""></iframe>
                </f:verbatim>
            </af:panelGroupLayout>
    Then I want to click on a button to render that panelGroupLayout and then execute javascript on one element in the iframe.
        public String onClick() {
            formsRendered = true;
            FacesContext fctx = FacesContext.getCurrentInstance();
            ExtendedRenderKitService erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
            erks.addScript(fctx, "window.myjsmethod()");
            return null;
    The issue is that I get a JS exception (undefined element) because the myjsmethod references a object that is inside the iframe, but at the moment of the call, the iframe is not rendered. Basically I need to be able to switch the rendered property, wait the rendering and then call the JS. Everything is triggered by one button click.
    JDev 11gR2

    Try to use visible property instead of rendered.

  • Im new to java can someone please help me with external method calls

    I have only been doing java for a couple of months using bluej, I really dont understand external method calls, this is for an assignment and i have managed the bulk of the code, ineed to make external calls to the other classes to return and input data.
    this is the code i have writen so far.
    class CD
    // The fields.
    public Artist performer;
    private String album;
    private String genre;
    private int numberOfTracks;
    private int yearReleased;
    *Please enter CD details, text entry requires quote marks "Greatest Hits"
    public CD (String album_Name){
    album = album_Name;
    numberOfTracks = 0;
    yearReleased = 0;
    performer = new Artist();
    /**blank constructor*/
    public CD ()
    {album = "";
                genre = "";
                numberOfTracks = 0;
                yearReleased = 0;
                performer = new Artist();}
    * accessor methods
    /** method to return album details to the output window*/
    public void print_albumDetails(){
    System.out.println("Album: " + album);
    System.out.println("Genre: " + genre);
    System.out.println("Number of Tracks: " + numberOfTracks);}
    /** accessor method to return the name of the album*/
    public String show_album(){
    return album;}
    /** accessor method to show artist details from artist class*/
    public void print_details(){
    performer.print_details();}
    * mutator methods
    /** mutator method to change album name please enter name with quotes*/
    public void change_album(String newAlbum){
    album = newAlbum;}
    /**mutator method for adding the album year and checking it correct
    * please enter a year between 1900 and 2005*/
    public void album_year (int year){
    if ((year < 1900) || (year > 2005))
    System.out.println("sorry the year is incorrect please enter a year between 1900 and 2005");
    else yearReleased = year;}
    /** mutator method to alter the number of tracks and check if the ammount is greater
    * than zero*/
    public void change_Number_Of_Tracks(int no_Of_Tracks){
    if (no_Of_Tracks > 0)
    numberOfTracks = no_Of_Tracks;
    else System.out.println("you have not entered a correct number");}
    /** mutator method to change the genre and check it has been entered correctly
    * Please enter 1 for Soul
    * 2 for Blues
    * 3 for Jazz*/
    public void change_Genre(int Change_Genre){
    if ((Change_Genre <= 0) || (Change_Genre > 3)){
    System.out.println("You have not entered the correct available genres");
    System.out.println("which are 1 for Soul,2 for Blues or 3 for Jazz");}
    else if (Change_Genre == 1)
    genre = "Soul";
    else if (Change_Genre == 2)
    genre = "Blues";
    else if (Change_Genre == 3)
    genre = "Jazz";
    to this i need to add an external call to the class Artist to be able to enter firstname and second name, I know that external calls use dot notation
    and the instance of Artist is called performer but i cant get the call to these methods in the Artist class to work
    Artist class
    /** mutator method to change or add artist first name, remember to add quotes*/
    public void cName(String name){
    firstname = name;}
    /** mutator method to change or add artist surname remember to add quotes*/
    public void csurName(String surname){
    lastname = surname;}
    can some please give me some help

    Also, if you can't get them to work, what is the error message you are getting?
    Baron Samedi

  • How to eliminate empty node space from tree when rendered property is false

    Hi
    I have created a menu Tree for my ADF BC application while working in JDev 10.1.3.3.
    I have tried two methods, first is by creating a menu model as discussed in example in ADF Developers Guide Book Section 19.2.1. Second by creating two view objects and creating the menu tree from my database table.
    Depending on the logged in user I want to decide whether to show or not to show a menu tree option to the user. For this purpose I have implemented a function in a managed bean that calls a pl/sql stored procedure to decide if the user has access to a certain component. In first case I have set the rendered property of the menu item to #{menuTree.shown}, where shown is an attribute in the menu model whose value is properly set using java functions that call pl/sql function in turn. In second method, I have also tried to set the rendered property and calling a function that returns true or false based on if the user has access to the menu option.
    Problem
    When rendered property is returned as false, although the menu option is not displayed but an empty space is displayed in my tree and remaining nodes and/or menu options are displayed with an ugly gap.
    How I can remove this unwanted gap, is there a way?
    Regards,
    Amir
    1st option:
    My menu tree:
    <af:menuTree var="menuTree" value="#{menuModel.model}">
    <f:facet name="nodeStamp">
    <af:commandMenuItem text="#{menuTree.label}"
    action="#{menuTree.getOutcome}"
    _rendered="#{menuTree.shown}_"/>
    </f:facet>
    </af:menuTree>
    2nd option:
    <af:tree value="#{bindings.MainMenuView.treeModel}" var="node">
    <f:facet name="nodeStamp">
    <af:switcher facetName="#{node.hierType.name}">
    <f:facet name="MainMenuViewNode">
    <af:outputText value="#{node.Name}" _rendered="#{userInfo.mainNodeOk}"_ />
    </f:facet>
    <f:facet name="SubMenuViewNode">
    <af:commandLink text="#{node.Name}" _rendered="#{userInfo.mainNodeOk}_">
    <af:setActionListener from="#{node.destinationUrl}"
    to="#{menuTree.getOutcome}"/>
    </af:commandLink>
    </f:facet>
    </af:switcher>
    Edited by: Amir Khan on Jan 12, 2009 8:54 PM

    Hi,
    if this reproduces in JDeveloper 10.1.3.4 then this sounds like a bug that you should file
    Frank

  • Problem with Rendered property using SPEL

    I have a page with three different graphs. This page is associated with a AM which has a PVO object. The PVO has three transient boolean variables and I set all except one to false by calling initProperties in the processRequest method.
    I have tied this three different boolean variables to 'Rendered' property of three items of type graph in the page.
    I am using the ${oa.<instancePVO1>.<Attribute>} syntax in the Rendered property.
    Despite this, I see all three graphs rendered when I launch the page. But I can see that only one of three attributes for the PVO is TRUE.
    Can anyone think of some aspect that I missed?
    Your help will be appreciated.
    Thank you,
    Arun

    Hi Harinath and Gowtam,
    Thank you for the reply.
    I am setting the attributes in PVO properly to false. I actually use the variables to three different queries on which the graphs are based on and they fire the right ones. Only the problem is with the rendered property using the SPEL.
    Also, I made sure that there is only one row in the PVO and it is initialized properly with the Primary key and I am using the PVO.first() to retrieve it.
    It would helpful if you could throw some light on how to debug the SPEL...I tried System.out.println-ing the SPEL expression ${oa.PVOinstance.attribute} but I get errors...
    Thank you,
    Arun

  • Action Listener Method called multiple times

    I have a page (fragment .jsff), containing a simple input text and a button called "search". When I click on "Search" the action listener is triggered multiple times. (The results are displayed in a table inside a panel collection).
    The results are actually coming back ok.
    When I debug the code, I can see the action listener method called twice.
    Do you know why is that?
    What should I be taking care of?
    This is my code :
    *** Fragment ****
    <af:commandButton text="#{identityBundle.search_label}" id="cb1"
    actionListener="#{UserDetailsBean.searchUsersListener}"
    disabled="#{!bindings.searchUsers.enabled}"/>
    *** Managed bean ***
    public void searchUsersListener(ActionEvent actionEvent) {
    // Add event code here...
    DCBindingContainer bindings = (DCBindingContainer)getBindings();
    DCIteratorBinding iter = bindings.findIteratorBinding("userIterator");
    DCDataRow row = (DCDataRow)iter.getCurrentRow();
    User user = (User)row.getDataProvider();
    boolean isSearchCriteriaPresent = false;
    if(user != null){
    String fn = user.getFirstname();
    if(fn != null && !fn.trim().equals("")){
    isSearchCriteriaPresent = true;
    user.setLastname(fn);
    user.setNonMTUserLogin(fn);
    try {
    Map <Object, Object> userMap = PropertyUtils.describe(user);
    for(Map.Entry<Object, Object> entry: userMap.entrySet()){
    if(entry.getKey() != null && entry.getValue() != null && !entry.getKey().toString().equalsIgnoreCase("class")){
    isSearchCriteriaPresent = true;
    break;
    } catch (IllegalAccessException e) {
    e.printStackTrace();
    } catch (InvocationTargetException e) {
    e.printStackTrace();
    } catch (NoSuchMethodException e) {
    e.printStackTrace();
    if(!isSearchCriteriaPresent){
    user.setFirstname("*");
    OperationBinding opBinding = (OperationBinding)bindings.getOperationBinding("searchUsers");
    opBinding.getParamsMap().put("user", user);
    opBinding.execute();
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    Map<String, Object> scopePageFlowScopeVar= adfFacesCtx.getPageFlowScope();
    scopePageFlowScopeVar.put("userSearchCriteria", user);
    ADFContext adfCtx = ADFContext.getCurrent();
    Map sessionScope = adfCtx.getSessionScope();
    sessionScope.put("userSearchCriteria", user);
    setUserSearchCriteria(user);
    if(selectedUserID != null){
    selectedUserID.setValue(null);
    RichTable table = getUserResultsTable();
    DCIteratorBinding searchUsersIterator = (DCIteratorBinding)bindings.get("searchUsersIterator");
    Row[] rows = searchUsersIterator.getAllRowsInRange();
    if(rows.length > 0){
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(rows[0].getKey());
    rks.add(keyList);
    table.setSelectedRowKeys(rks);
    table.setDisplayRowKey(keyList);
    refreshState(table);
    if(!isSearchCriteriaPresent){
    user.setFirstname(null);
    else{
    deleteUserButton.setDisabled(true);
    resetPasswordButton.setDisabled(true);
    enableUserButton.setDisabled(true);
    disableUserButton.setDisabled(true);
    Thanks in advance for your help

    Hi,
    Can you try this?
    1. set partialSubmit=true for the "search" button
    2. set "search" button id as partialTrigger in your result table
    -Prasad

  • In which function i should set rendered  property of components

    Hi
    Thank you for reading my psot.
    it is really making me mad.
    can some one tell me which function of a backing bean i should use to set rendered property of some components ?
    i tried all of them and none of them seems to apply the rendereing propretiy.

    It is easy to find out
    Add a message group to the Page. Then in each method add
    info("At method <method name>");
    Run the application and see the results.
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • H:inputText ; How To initialize value Property from back/bean method?

    Hello Guys at Sun Forums.
    I am a newbie at using JSF. and I'm having a bit of a Problem.
    I don't know how to initialize the value property of a h:inputText from a method inside a backing bean that returns a String data type.
    My Method inside the Backing bean is this:
    public String getLastDate()
            Connection con = null;
            Statement stmt = null;
            ResultSet rs = null;
            Date DateCapt = null;
            String DateConv= null;
            try{
                Class.forName("com.sybase.jdbc2.jdbc.SybDrive").newInstance();
                con = DriverManager.getConnection("jdbc:sybase:Tds:localhost/BAN_PRO_SNP", "xxxx", "xxxx");
                if(!con.isClosed()){
                    stmt = con.createStatement();
                    stmt.executeQuery ("SELECT TOP 1 CONVERT(VARCHAR(10), fec_parametro, 103) fec_parametro FROM snp_sei_parametros" +
                    "     WHERE cod_parametro = 'FECHA'" +
                    "     ORDER BY fec_parametro DESC");
                    rs = stmt.getResultSet();
                    while (rs.next())
                                DateCapt = rs.getDate("fec_parametro");
                rs.close();  
                stmt.close(); 
            catch (Exception ex)
                        System.out.println("COULD NOT LOAD THE DRIVER!!!!");
                        System.out.println(ex);
                    DateConv = String.valueOf(DateCapt).toString();
        return DateConv;
    }As you can see the Method returns a String data type, and all I want to know is how put that returned String as the initial value of a h:inputText. when the jsf-jsp page loads.
    Please Help Me.

    You should be able to do
       <h:inputText value="#{bean.lastDate}"/>Where 'bean' is the managed bean name containing
    the method getLastDate().
    When the view is rendered, the getter (getLastDate())
    will be called to display whatever value is returned.

  • A tricky way to twick ValueBinding language to bind a method call

    Here is the scenario:
    I'd like component can bind value to method call(with parameters) to a java instance, of course including backingBean.
    I wish this solution would be useful, especially when you are working in iteration component such as ForEach, TreeView or DataTable, EL ValueBinging language might be too restricted to complex expression. This way, you can pass iteration items as parameters into a method can and return a value to you page by valuebinding language
    In JSP:
        <h:outputText value="#{Page1.callHelper[Page1]['targetMethod']['James'][Page1.callEnd]}"/>In PageBean:
         public String targetMethod(String name){
             return "Hello, " + name +"!";
        private CallHelper callHelper = new CallHelper();
         public CallHelper getCallHelper() {
              return callHelper;
         public void setCallHelper(CallHelper callHelper) {
              this.callHelper = callHelper;
         private CallEnd callEnd = new CallEnd();
         public CallEnd getCallEnd() {
              return callEnd;
         public void setCallEnd(CallEnd callEnd) {
              this.callEnd = callEnd;
         }Util classes:
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.util.ArrayList;
    import java.util.LinkedHashMap;
    import java.util.List;
    import java.util.Map;
    public class CallHelper extends LinkedHashMap {
         private CallHelper parent;
         public Object get(Object key){
              if(key instanceof CallEnd)return getRoot().methodCall();
              else{
                   Object value = super.get(key);          
                   if(value == null){
                        value = new CallHelper();
                        put(key, value);
                        ((CallHelper)value).parent = this;
                   return value;
         public boolean containsKey(Object key){
              return true;
         public boolean realContainsKey(Object key){
              return super.containsKey(key);
        protected CallHelper getRoot(){
             CallHelper root = this;
             if(root.parent==null)return root;
             else return root.parent.getRoot();
         protected Object methodCall(){
              Object result = null;
             List callParameters = new ArrayList(2);
             listCallParameters(callParameters, this);
             if(callParameters.size()>1){
                  Object instance = callParameters.get(0);
                  String methodName = callParameters.get(1).toString();
                  List methodParameters = new ArrayList();
                  for(int i=2; i<callParameters.size(); i++){
                       methodParameters.add(callParameters.get(i));
                  Method method = findMethod(instance, methodName, methodParameters);
                  if(method != null){
                       try {
                             result = method.invoke(instance, methodParameters.toArray());
                        } catch (IllegalArgumentException e) {
                        } catch (IllegalAccessException e) {
                        } catch (InvocationTargetException e) {
              this.clear();
              return result;
         private void listCallParameters(List list, Map map){
              if(map==null || !map.keySet().iterator().hasNext())return;
              Object key = map.keySet().iterator().next();
              if(key instanceof CallEnd)return;
              list.add(key);
              listCallParameters(list, (Map)map.get(key));
         private Method findMethod(Object instance, String methodName, List parameters){
              Method result = null;
              Method[] methods = instance.getClass().getMethods();
              for(int i=0; i<methods.length; i++){
                   if(methods.getName().equals(methodName)){
                        System.out.println(methodName);
                        Class[] paraClasses = methods[i].getParameterTypes();
                        if(paraClasses.length==parameters.size()){
                             boolean match = true;
                             for(int j=0; j<paraClasses.length; j++){
                                  if(parameters.get(j)!=null && !paraClasses[j].isInstance(parameters.get(j))){
                                       match = false;
                                       break;
                             if(match){
                                  result = methods[i];
                                  break;
              return result;
    public class CallEnd {
    Improvement:
    Anyone can make it thread safety and bind callhelper and callend directly to FacesContext properties rather than each backingBean.
    Have fun!
    And feel free to contect me at:
    [email protected]
    [email protected]

    You must seperate your parameter preparing and action method calling for sure.
    It depends on what kind of parameters you need to pass in:
    1. If action method is bound to several buttons, and it just wants to know which button was clicked, you can set actionListener to prepare it for you. Because the event includes the information you need.
    2. For other kinds of parameters, you can use ValueBinding Language to bind parameter values to backingBean, then the action method(without parameters) can pick parameters up from backingBean.

  • How to modify method call

    I've written a method that compares two strings to see if the first string contains the second string. boolean contains(String searchString, String searchTerm) throws Exception
        boolean result = false;
        for (int i =0; i<searchString.length()-searchTerm.length() + 1;i++ )
            String tempString = searchString.substring(i, i+searchTerm.length() );
            if (tempString.equals(searchTerm))
                result = true;
                break;
        return result;
        } // end containsTo call this method, it looks like this:
    if ( contains(firststring, secondstring) )
    I'd like to be able to call it like this:
    if ( firststring.contains(secondstring) )
    Which I beleive I can do, using "extends" but I cant figure out how.
    Can someone point me in the right directions?
    Thanks.

    lkb3 wrote:
    Hmmm.. upon further investigation, it appears that earlier versions of Java did not include a contains command, and the program I'm writing for uses an earlier version of java, so my question remains open.
    In which case, the answer is: you can't. java.lang.String is a final class, you can't extend it. Carry on as you are

  • AcquireConnection method call to the connection manager Excel connection Manager failed

    I used VS Studio 2008 (BIDS version 10.50.2500.0) on an WinXp machine (v 5.1.2600 SP3 Build 2600) to create a package that writes multiple query results to different tabbed sheets of a single excel spreadsheet. The package was working just fine and has run
    successfully multiple times, but all of a sudden when opening the project, every single Data Flow task with an Excel Connection Manager displayed error icons. Each raises the following error message when attempting to open the Advanced Editor:
    SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005 Description: "Unspecified error". Error at DataFlow task name: SSIS error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method
    call to the connection manager Excel connection Manager failed with error code 0xC0202009. There may be error messages posted before this with more information on why the Acquire Connection method call failed. Exception from HRESULT: 0Xc020801c (Microsoft.SQlServer.DTSPipelineWrap)
    From the time I created the original package (when it worked fine) until now:
     1) I have been using the same computer, the same login account and the same permissions.
     2) I have been writing to the same (32 bit) 2010 Excel file (which I created) in a folder on my local machine.
     3) The filename and location have not changed; a template file is used each time to move and overwrite the previous file. Both are in the same locations.
     4) I can independently open the target Excel file and the template Excel files with no errors.
     6) The ConnectionString has not changed. The Connnection String I am using is
      Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Conversion\Conversion\Results_dt01.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES;".
     7) Run64BitRuntime is set to False.
    8)  Delay Validation is set to true
    9) This is not running under a SQL job  
    10) There are no child packages being run
    I CAN create a NEW Excel Connection Manager, assigning it the exact same target Excel spreadsheet, successfully, but when I attempt to assign it to the Data Flow destination this error occurs:
    "Test connection failed because of an error in initializing provider. Unspecified error."
    Thinking that the driver might be corrupt, I opened a second SSIS package, which also uses the Excel Connection Manager (same driver) and this package continues to work fine on the same workstation with no errors.
    I have searched online for causes of this error for many hours and found nothing that helps me to solve this issue.
    Does anyone have any suggestions for me?

    Yes, I have verified that the Excel file is not in use or opened by anyone, including me. It has been two months since I opened this particular package, although I have been working with other packages in this project. I just discovered that another
    package in the same project has the same problem - all Data Flows that output to an Excel Destination now have the same error icons. This second packages outputs to an entirely different Excel file than in the first package.  A summay:
    Package #1 has error on every Excel Destination and uses templateA to overwrite fileA and then writes to fileA
    Package #2 has error on every Excel Desintation and uses templateB to overwrite fileB and then writes to fileB
    Package #3 has no error on any Excel Destination and is linked to multiple files (none are A or B)
    Package #1 and #2 are in the same project, but Package #3 is in a separate project .
    I will try replacing the Excel files with new ones for Package 1 and 2.

  • [Load data from excel file [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messa

    Error
    [Load data from excel file [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There
    may be error message
    I am using BIDS Microsoft Visual Studio 2008 and running the package to load the data from excel .
    My machine has 32 bit excel hence have set property to RUN64BITRUNTIME AS FALSE.
    But the error still occurs .
    I checked on Google and  many have used Delay validation property at Data flow task level to true but even using it at both excel connection manager and DFT level it doesnt work
    Mudassar

    Thats my connection string
    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\SrcData\Feeds\Utilization.xlsx;Extended Properties="Excel 12.0;HDR=NO";
    Excel 2010 installed and its 32 bit edition
    Are you referring to install this component -AccessDatabaseEngine_x64.exe?
    http://www.microsoft.com/en-us/download/details.aspx?id=13255
    Mudassar
    You can try an OLEDB provider in that case
    see
    http://dataintegrity.wordpress.com/2009/10/16/xlsx/
    you might need to download and install ms access redistributable
    http://www.microsoft.com/en-in/download/details.aspx?id=13255
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • Where is source data coming from?

    Hi, I've cobbled togeher a working app (based on some examples found on the net). The application works well, but I have one specific question as to why it works! The application takes data from the mic on my pc and saves it to a file. I can play bac

  • Displaying in a main report one field's comma separated values in a subreport

    Post Author: shalbert CA Forum: Formula I have two database tables Fields and Memfields: Fields Table ID LABEL 1 A 2 B 3 C 4 D Memfields Table ID LABEL 1 B,D 2 C,A 3 A,D 4 A,B So what I want to do is create a mainreport linking the sub-report by {fie

  • Expense reports are not processing for future date?

    hi folks, in our co.expense reports are not processing for future date, even though the end date is one month from now the expense reports are not getting paid. can anybody assist me to come out of this issue. thanks in advance, regards bhanu

  • "Service Battery" Help

    I noticed that the service battery indicator has appeared on my Macbook Pro. I downloaded an app called battery health that gave me this information: Current Max: 2815/5770 mAh Health: 49% Details: Cycles: 396 Age: 1.5 Years Manufacture Date: Dec 18,

  • Oracle execution in C program exits immediately when CNTR-C is hitted

    Hi, I have a pro c program that connects to oracle and executes a stored procedure. This is done in a while loop. An intrrupt signal function is done(catches CNTRL-C signal), which makes the varibale in while loop false and exits normally in coming l