These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Send Form Data to Access Database

Lady Di
Registered: Feb 18 2009
Posts: 86

Is there a way to send certain pieces of form data to fields in an Access Database? I have a form that salesmen fill out to let us know when an order needs changed. I would like to set that form up, so that the people changing the orders can just click a button and the form data will automatically move to the database - thus reducing the amount of manual entry into the database. Can this be done? If so, what do I need to do in order to accomplish this?

My Product Information:
Acrobat Pro 9.4.3, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
It's possible to connect a PDF form to an Access DB, but it requires quite a bit of scripting knowledge.
Also, it requires that the DB is available as local ODBC resource and that you're using Acrobat (version lower than X)... So yes, it's possible, but complicated to implement.
Another option would be to export the values of the form to a CSV file and then import that directly into the DB. That is less complex to implement, but requires more user interaction (saving the CSV file and then importing it into the DB).

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

maxwyss
Registered: Jul 25 2006
Posts: 255
And a third possibility would be connecting the database to an internal (dedicated) webserver, and submit the form data to that server, which then does the communication with the database. The implementation on the back end side may be more complex, but it has been done before many times; on the form side, it is easy.

And the fourth possibility (in order to have them all now) would be setting up a communication channel with the database using SOAP. This is probably about as complex as the other options, but would allow a consistent two-way communication.

Hope this can help.

Max Wyss.

Lady Di
Registered: Feb 18 2009
Posts: 86
Would there be a way to set up a button that the user could click that would save certain form data as a csv file?

What is SOAP?

How would you set up the "third possibility"?

Which option would you recommend - I'm afraid, I am not very proficient in scripting.
lancewelker@dec...
Registered: Nov 2 2011
Posts: 1
Looking for a solution here. I'm using Acrobat X Pro.
Need to create a button on the form that will INSERT the form data into a SQL database.
I can't find a way to export the data in CSV format, the option is not available.
Any help would be much appreciated.

Lance Welker

maxwyss
Registered: Jul 25 2006
Posts: 255
To Lady Di (and also lancewelker): It is possible to set up a button to export the data as CSV. In any case you would first assemble the CSV record for your form (that's simple text manipulation). You would then write the result into a hidden (multiline) text field. Then you export or submit the data, making sure that you only export/submit that assembly field. When processing the output, it is easy to chop off whatever is not CSV.

Another way would be creating a Data Object from the CSV record, and export it as such. If you want to save the file to a specified path/filename, you will have to create a trusted function to do so (see Acrobat JavaScript documetation for more details)

SOAP stands for "Simple Object Access Protocol", and is a protocol to talk to a remote server or database.

The "third possibility" would be to set up a webserver, to which you would submit the data. If you chose HTML POST as submit method, you could use more or less off-the-shelf applications for "normal" webforms.

The simplest variant would be option 2. The most flexible and future-proof one would be option 3.

Hope this can help.

Max Wyss.