Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

ODBC connected data NEXT, PREVIOUS buttons do not work

Avatar

Former Community Member
I have created a form in Live Cycle Designer 8.05 that reads data from a OLEDB System DSN connected to our data warehouse application. I test the form in Acrobat preview from within LCD and Acrobat Pro (and Reader) and I can see the first record. All is good so I add some navigation buttons to click through the records and they do not work. I have used FormCalc and Java versions of the CLICK event and when using xfa.sourceSet.DataConnection.next() and setting the Language to FormCalc and Run AT: SERVER I get the following message when testing with the data: Couldn't post data to ".



When I use the same code but set the Run At: to Client I get the following error: Script Failed (Language is formcalc; context is xfa[0].form[0].topmostSubform[0].form1[0],NextPage[0])script=xfa.sourceSet.DataConnection.next() Error: accessor 'xfa.sourceSet.DataConnection.next()' is unknown.



I suspect the problem is with my DataConnection setup or even my System DSN but I am not sure where to start troubleshooting this.



Any help would be greatly appreciated.



Cheers,



Dave
2 Replies

Avatar

Former Community Member
The fact that you got data in the form when it loads tells me that you have set up the DSN correctly. You cannot run these commands on the server as the data connection is set up on the client and the server would not have any idea about a client connection ...so do not set the script to run client.



I always use JavaScript so lets stick to that.



The command is xfa.connectionSet.DataConnectionName.next();



The default name for the DataConnection is DataConnection. Did you rename it? Look at the root node in the Data Connection view .... that is the name that should appear in the command.



Lastly, are you using Acrobat or Reader to render the form. If you are using Reader you must Reader Extend the form to allow database connections to be used. I suspect that this is your issue.



Hope that helps

Avatar

Former Community Member
Paul, I switched the command to use javascript instead of FormCalc and it is now working. Thank you for your help. If I get a promotion I won't forget you :-)!!!



I was running my FormCalc to run on the client but for some reason it did not work.



Thanks a bunch



-Dave