0 Replies Latest reply on May 6, 2011 1:27 PM by Fellipex25

    sourceSet in function (Jscript) not found any Data View

    Fellipex25

      HI,
      I have the code:
      var = oDB xfa.sourceSet.DataConnection.clone (1);

      oDB.nodes.item (1). query.setAttribute ("text", "CommandType");
      oDB.nodes.item (1). query.select.nodes.item (0). value = "SELECT * FROM vw_products";

      oDB.open ();
      oDB.close ();


      This code works perfectly if I call in initialize the form.
      (form1.Inicial::initialize - (JavaScript, both))

      But the same code does not work if I call a function in Jscript, (Function test {} for example). Not found "sourceSet.DataConnection".
      Any idea what could be? I've tried everything but it only works if i put in initialize the page.