0 Replies Latest reply: Nov 11, 2014 10:37 PM by Caspervt2 RSS

    Database connection is not working in Free Acrobat Reader

    Caspervt2 Community Member

      Hi,

       

      I am working on a pdf that imports data from an sql server. I got it working flawlessly in livecycle and in Acrobat Reader Pro. But in Free acrobat reader it makes an index error on the click event on the button that runs the javascript for getting a record.

       

      I applied reader extension from Acrobat Reader Pro, but never the less it won't work.

       

      My question: Does Free Acrobat Reader support this kind of database lookup with RE enabled.

       

      I have tried both with formcalc and javascript. Both works in livecycle and the pro version of acrobat reader.

       

      I am only working on the client side and do not utilize livecycle server.

       

      example code:

       

      var nIndex = 0;

       

      while(xfa.sourceSet.nodes.item(nIndex).name != "Dataforbindelse"){nIndex++;}

       

      var oDB = xfa.sourceSet.nodes.item(nIndex).clone(1);

       

      oDB.nodes.item(1).query.setAttribute("text", "commandType");

       

      oDB.nodes.item(1).query.select.nodes.item(0).value = "SELECT * FROM [Wennstrom Fuel Systems DK$Service Header] WHERE [No_] = '458SV0"+form1.main.NavID.rawValue+"'";

       

      oDB.open();

       

      oDB.close();

       

      The java error:

      GeneralError: Operation failed.

      XFAObject.item:2:XFA:form1[0]:main[0]:Button7[0]:click

      Index value is out of bounds

       

      //Casper