Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

XML Data Source Import on Start

Avatar

Level 2
I have a "time sheet" form that I've created in Livecycle Designer. It's going to interface with software that holds a database in MySQL. My understanding was that LCD doesn't play well, if at all, with MySQL. I wrote a PHP script that converts the entire MySQL database to an XML database.



So on my server I have database.xml.



I have created a data connection to database.xml in the form, so the architecture of the connection is set up. If I open the form in Acrobat Pro, I can manually import data from database.xml, but only from Pro and only if I know where the file is.



Once this is done, I have a drop down menu that these fields are populated into.



So here's the thing, can this form just have a javascript initialize event somewhere that finds the database.xml file, since it's in the same folder, import the values, and populate them where they need to be? Conceptually, it sounds like something that I should, of course, be able to do since it's just duplicating my mouse strokes in Pro, but these security issues and the fact that I want the form to work from Reader, this gets hairy.
4 Replies

Avatar

Former Community Member
The statement that LCD does not play well with MySQL is not true. To be able to do this you will need an ODBC driver to connect to the MySQL database (I do it all of the time). Make sure that you get the driver version that matches your version of MySQL. This does mean that you will have to load and configure that driver on each machine that will use the form (it woudl be the same thing whether you use Excel or MySQL). Assuming you get over that issue you still have to allow Reader to do the DB access. To do this you will need LiveCycle Reader Extensions to Reader extend the form. This is part if the LiveCycle Update1 program.



You may want to look at exposing the database as a web service ....that way you would not need the ODBC connection setup but you woudl still have to Reader Extend to allow for Web Service calls from Reader.

Avatar

Former Community Member
The statement that LCD does not play well with MySQL is not true. To be able to do this you will need an ODBC driver to connect to the MySQL database (I do it all of the time). You can get it from the MySQL site. Make sure that you get the driver version that matches your version of MySQL. This does mean that you will have to load and configure that driver on each machine that will use the form (it woudl be the same thing whether you use Excel or MySQL). Assuming you get over that issue you still have to allow Reader to do the DB access. To do this you will need LiveCycle Reader Extensions to Reader extend the form. This is part if the LiveCycle Update1 program.



You may want to look at exposing the database as a web service ....that way you would not need the ODBC connection setup but you woudl still have to Reader Extend to allow for Web Service calls from Reader.

Avatar

Level 2
This is a very heavy and important database that we will be using, and it doesn't sound like they're very willing to expose this database. Installing it per machine could work in theory but the idea is to have this timecard as a utility that casual employees can pull up and visit on the web, especially if they missed a day of work.



They won't have the first clue how to set up an ODBC connection on their home PC's, nor will they want to.



I do appreciate this clarification though, Paul. It may work for some other projects I'll be doing.



For this reason, unless I can get an ODBC server side, if that even conceptually would work (It's Linux), I'm still thinking I will have one of two options:



1. Find some slick java or formcalc that can pull in values from an XML database derived from the MySQL, which I have mostly ready to go except for said "slick java or formcalc".



2. Link the user to a PHP script that grabs values from the MySQL database, begins to construct the PDF on the fly, and insert the values as necessary.



Any input on this is much appreciated.

Avatar

Former Community Member
Going through the PHP program or something similar is the way to go. I would expose that program as a Web Service if at all possible.