1 Reply Latest reply on Feb 23, 2011 5:59 AM by pguerett

    Databases and LC ES2 connectivity - Issues and Solutions!

    Shailevit Level 1

      By far the most important subject mater and yet probably a simple solution, yet there are some questions that just elude me. And finding the answers in an online manual is sometimes cumbersome at best - if the examples even make sense. So here are the 3 most pressing questions and some insight.

       

      1. Once a PDF form is created in LC ES2, and the connection to a database (MS Access) is made, tested, confirmed, how do you install this new form on someone else's system and create the same connection, if they do not have LC installed?

       

          a, Note that the connection needed a system DNS. In Win7, you have to use the 32bit ODBC driver to work with the Acrobat 32bit software and the

                MS Access 2007 32bit DB,

          b.Data connections can only be created in the LC ES2 software. Under New dataconnections.

       

      2. How can you populate a drop-down (choices) field with data from the DB?

       

          a. Arrays work great, but I am only able to create them statically within the form themselves, not query the DB for info.

           b. Possible solution - and I am not sure if this works or how - Specify the type of connection you are creating? i.e.: In the Connection String Dialog box:

                Choices are - Table, Stored Proceedure, SQL Query. How do the latter two work and where can one find out more information on those choices?

       

      3. Can you filter Information that will propagate to other fields when you make a selection from a drop-down list where the data is supplied via the DB?

       

      ..clarification: You have 3 drop-down fields (ex: Country, State, City). Data for country is provided by DB. If you choose US, then the next drop-down field will populate with US states, etc. I have seen this done with IF..Then..Else clauses, but in a static environment, not with data coming from a DB.

       

      Side note: After a dataconnection was made in original form, the Date/time field lost its ability to show a calendar view in Acrobat. Hmmm

      Also beware how you set up the fields in Access vs. PDF and the validation rules thereof.

       

      Any help advice comment are appreciated. Hope this will also help answer some q. for a lot of neubie developers like me.

       

      Cheers -

        • 1. Re: Databases and LC ES2 connectivity - Issues and Solutions!
          pguerett Level 6

          1. To move the form to someone else's computer you will have to set up the DSN on their machine. You can do this from the Control Panel/ Administrative Tools/ Data Sources ODBC. Each machine will have to have the 32 bit driver that you used as well.Those screens that you used to set up the DSN in Designer are actually Windows screens and you will access them from the location mentioned above. The drivers that you used tend to be loaded by the program mentioned (MicroSoft Access) or you may be able to find it on teh MS site ....those 32bit ODBC drivers may not be there by default.

           

          2. The DDList population can be done after you set up a Data Connection. On the DDList object you need to activate the Dynamic Properties of the object. This is done by clicking on the upper right corner of the Object palette (see image below)

           

          screen1.png

          This will open a menu and you need to choose "Show Dynamic Properties"

          Any property that is dynamic will show up with a different color and underlined (like a hyperlink - see the image above). Now when you click on that link a wizard will come up and allow you to bind this property to your defined DataSource - in your case columns in your DB.

           

          3. The above technique will work to populate the DDList but if you want to use that to filter further and get a specific record back to populate the rest of the form you will need to write code. There are a couple of different examples of this floating around. I did a webinar on the topic ...and it covers the simple to the more complex :

           

          http://adobechats.adobe.acrobat.com/p69655795/

           

          Or if you want to go directly to a solution one of my co-workers created a blog on the topic:

           

          This is the basic one:

          http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/

           

          And this is the more advanced topic ...about getting a specific record:

           

          http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/

           

          Hope that helps

          Paul