Expand my Community achievements bar.

SOLVED

PDF binding to MySQL databse - how is it done?

Avatar

Level 3

How can I bind data entered in to a Dynamic PDF form to reside in a MySQL database. I seem not able to build a connection.

So here are the steps I follow:

Binding / New Connection / Name: testdata ; Description: OLEDB database / Connection String: build: SQL Native Client / Data Source: location of the SQL database (.mwb) ; Log on to server: localhost

But when I test the connection I get an initialization error and login time out.

So my question is:  How do you connect the PDF fields to a MySQL database ? and what am I doing wrong ? Is it a feasable process to bind also check boxes and other fields to a database ? How would you bind data dynamically - say if I choose a certain field from a dropdown menu, certain other fields will populate via the database ?

Thanks again for all help and insight.

Shai

PS I attached a sample form (not yet completely integrated to accept certain data) and a sample MySQL database (no data inside).

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Couple of things before you go down this path.

1. You will need to load the ODBC driver fro MySQL on your machine and each machine that will want to use that form.

2. Then you need a DSN that will create the connection between the MySQL DB table and your form.

3. If you are using Acrobat to run the form then you can proceed. If you are using Reader it does not support DB connections without Reader Extending the document using LiveCycle Reader Extensions Server.

Have you met all of these criteria?

Paul

View solution in original post

6 Replies

Avatar

Correct answer by
Former Community Member

Couple of things before you go down this path.

1. You will need to load the ODBC driver fro MySQL on your machine and each machine that will want to use that form.

2. Then you need a DSN that will create the connection between the MySQL DB table and your form.

3. If you are using Acrobat to run the form then you can proceed. If you are using Reader it does not support DB connections without Reader Extending the document using LiveCycle Reader Extensions Server.

Have you met all of these criteria?

Paul

Avatar

Level 3

Thanks Paul,

That solved this one. I am also trying to configuer the same form with MS Access (on another PC), to compare and contrast the 2 methods. I set up the link the same way, and actually picked the tuples from the data view aspect of LifeCycle designer. Connection tested successful, location is correct, all fields match. But here is the crux: When I load the form in Adobe Acrobat 9 pro, it says: Connection for Source DataConnection failed because the environment is not trusted !

I am not sure how that can be, since I created the form as the admin and running everything same way. I did not implement any restrictions on any of the forms of the database. Any solutions for this one is greatly appreciated. If you need the forms adn the database, I can send them / attach them.

Thanks

Shai

Avatar

Former Community Member

Where is the DB located ......on the same machine or on a different machine?

Is it an Acrobat dialog or a Windows dialog?

Paul

Avatar

Level 3

DB and PDF forms are on one machine (local). Software is Access 2007 (.accdb), Acrobat Pro 9 (.pdf), File was saved as static.

But I am not sure on the dialoge ( Acrobat vs. Windows). I used the MS Access 2007 connector. Connection checks out fine and so that the link,

since I can see and use the fields that were built in Access. Hence I use those fields, where the biding is automated for me.

When I save the form, there are no errors or warnings listed in LifeCycle designer - bottom window.

Just when opening the file in Adobe, it mentions that the access is somehow prohibited. Also, how does one send the data

to access once al the fields are filled out. I couldn't create or find a button for that?

Again, thanks for your help and input.

cheers

Shai

Avatar

Former Community Member

The data connection is controlled by Windows ...we merely make a call through Windows. If I remember right there is a setting in IE that allows you to add the domain as a trusted site.

AS far as an update goes, it is much more complicated. I suggest that you do a serach for Stefan Cameron. He write a blog about forms and has covered this topic. Once you get to the blog page simply search for database and you will find a couple of entries on this topic.

Paul

Avatar

Level 3

Thanks Paul,

I will check out the blog / site. But not sure why I need IE, since everything is running locally - local Access 2007 database & local PDF (Adobe). Both programs are fully installed on the system. No networking, no intranet, no file distribution or sharing, all local host (streight connection).

Thanks

Shai

PS: I did however check out the IE tools - options - security - site - intranet options and made sure all pertinent things are enabled.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----