Expand my Community achievements bar.

SOLVED

submit pdf form data to sql database

Avatar

Level 2

Where I can find detailed information on the process of sending data from pdf form stored on the website to the sql database stored on web server ?? Where I can find some samples I could use to build my form and related script(s).

Thanks for advice.

Tony

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

If you want the form to contact the DB directly you will have to set up a DSN on each of the machines that will run the form. Note that this wil only work on Windows machines. Also the form must be launched for the script to run (you mentioned the PDF was stored on the web server). I have some samples that show how to deal with a DB but the attachments do not seem to be working correctly on the forum yet. If you cannot retrieve them post your email and I will email them to you directly.

Paul

View solution in original post

14 Replies

Avatar

Correct answer by
Former Community Member

If you want the form to contact the DB directly you will have to set up a DSN on each of the machines that will run the form. Note that this wil only work on Windows machines. Also the form must be launched for the script to run (you mentioned the PDF was stored on the web server). I have some samples that show how to deal with a DB but the attachments do not seem to be working correctly on the forum yet. If you cannot retrieve them post your email and I will email them to you directly.

Paul

Avatar

Level 2

Hi Paul,

Thank you very much for your quick response. I can not retrieve your

attachments, so please send them by email. Thank you.

What does it mean that DSN has to be set up on each machine which will run

the form ??? Does it mean for each person who will use the form ?? or

rather once on the server where the form is hosted ??? It will be a bit

difficult to use if it will have to be installed on each user computers as

some users may not be happy to do it. If this is the case do you have any

solution you would recommend which will collect the data from the form

without asking users to do anything special on their computers ????

Regards,

Tony Pluta

Graphics Designer

Broadmeadow Road

Broadmeadow NSW 2292

Australia

Direct: +61 2 9492 1277

Facsimile: +61 2 9462 1383

Mobile: +61 403 399 167

tony.pluta@unitedgroupltd.com

www.unitedgroupltd.com

pguerett <forums@adobe.com>

22/04/2009 10:31 PM

Please respond to

clearspace-175680453-1j3c-2-80O2@mail.forums.adobe.com

To

Tony Pluta <tony.pluta@unitedgroupltd.com>

cc

Subject

submit pdf form data to sql database

If you want the form to contact the DB directly you will have to set up a

DSN on each of the machines that will run the form. Note that this wil

only work on Windows machines. Also the form must be launched for the

script to run (you mentioned the PDF was stored on the web server). I have

some samples that show how to deal with a DB but the attachments do not

seem to be working correctly on the forum yet. If you cannot retrieve them

post your email and I will email them to you directly.

Paul

Avatar

Former Community Member

A DataSet Name (DSN) is a description of the connection that windows uses to contact your database. Acrobat/Reader will use this DSN to communicate through Windows to the DB. It needs to be on each machine that will execute the form....otherwise Acrobat/Reader has no means of talking to the DB.

I agree ad for that reason we do not recommend using direct access to the DB from the form (unless there is a small controlled group of users). Other Customers will submit the form to a central location (a web server) and then have the web server update the DB. Others will email it to a central program and have that update the DB. One other way is to email back to a common person (who does have a DSN set up) and have that person open the form with their version then update the form. You will notice a common theme of sending info back to a central location and having the DB updated in a single spot. The volume of forms shoudl be considered in the decision as to which way to go.

Hope that helps

BTW I sent tthe sample files anyways.

Paul

Avatar

Level 2

Is there a specific application that is recommended the data be sent to?  What is the most common application used?

Avatar

Former Community Member

That woudl depend on  your web server and what language you are most comfortable programming in.

At this point in time they all do a good job of this.

Paul

Avatar

Level 3

Hi Paul,

I know this thread has been since 2007 but please help. I need to send form field data to a database.

How can I do this without installing anything on the user's PCs.

Do you have any sample form I can use?

I currently use Acrobat X and Livecycle ES.

thanks.

Avatar

Former Community Member

I woudl recommend using web services to do this but it will depend on the database as well as if you have a server we can submit the data to. Otherwise I cannot do it unless you put something on each machine. As well how many users woudl be using this?

Paul

Avatar

Level 3

Ok Paul.

I think sending from PDF - Server - Database would be the best option.

How do I go about this? Is it a very long process? Do you have a sample form that I can use to practice the codes?

thanks.

Avatar

Level 3

Ok Paul.

I think sending from PDF - Server - Database would be the best option.

How do I go about this? Is it a lengthy and rigorous process? can you send me a sample form so I can see the codes in it?

thanks.

Avatar

Level 3

Hi Paul,

I tested the forms you attached to this thread but they don't seem to function as described.

Could you please send to: www.his_favoured1@yahoo.co.uk

thanks.

Avatar

Former Community Member

They won't function because you do not have access to my databases. But the technique that is being used is what you want. There is lots of code to do this if you are not code savvy I woudl abandon this approach.

Paul

Avatar

Level 1

Paul,

Could I also get a copy of your form submitting data using web services? I am looking to do the same with a Form and SQL db I have setup.

You could email joe.cervantes@gmail.com

Thanks!

Avatar

Level 5

Hi Paul,

It would be better for me if you would share form with code so that I can practise it.

I look forward to getting it from you.

Thanks

Mehedee

Avatar

Former Community Member

If you are looking to submit the data from the form to a web service it is very straight forward. You need a field to hold the data (and also to bind the WS parameter to). In your web service you woudl define a string (to hold the data) as an input paramater. Then create a field on the form (make it invisible so the user does not see it). Then bind that input param to the field. Now when you are ready to call your web service populate the field using this command InvisibleFieldName.rawValue = xfa.datasets.data.saveXML("pretty") then you can execute the WS.

Hope that helps

Paul

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] ----