Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Database Connection

Avatar

13-10-2008

Im new to working with Livecycle. I am attempting to connect to a SQL database. Im able to setup the connection easy enough and select the table i want to query, but when I enter the field in to the binding section and test it. the field only displays the first value. Ive tied it different ways with different types of objects (list box, combo box, ect) .any ideas what Im missing...?

Replies

Avatar

08-04-2009

Hi Paul!

Thank you VERY much for attaching the PDF files, it works wonderfully!

I do have 1 question if you have a moment... Rather than capturing the data already in the DB on enter - would it be possible to simply AddNew() on Enter and append the data to the DB table?

Also, do you know if I can distribute this PDF file to other end users without having them establish the database connectivity on each of their machinces?

I'm using this internally, and both the MS DB and PDF file are available on the network drive so all users have rights to the edit/view the MS DB.

Thank you very much!

Chris

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

20-04-2009

Depending on the DB being used in most cases you have to create a new record in the DB (addnew) then update that record. That means you need two operations to accomplish this.

Each machine that loads the form will have to create a DSN on their local machine. This is why we do not recommend this approach as it involves creating and maintaining that data conenction on each machine. If there is a small number of users then it is not too bad....if this is an enterprise solution and there is a large number of users then this becomes a bigger issue.

Avatar

Avatar
Level 1
jne_digi
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
jne_digi
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
jne_digi
Level 1

20-04-2009

Hello Paul,

You seem to be one of the few people that understand this subject. I am new to LifeCycle Designer ES, having done the tutorials I  still have a huge hole in my knowledge for the project I am trying to complete.

My project requires that from a php page which is displaying information from MySql (say  purchase order information) a button (print this) is pressed and the same information on the previous php page populates a PDF form. In this instance the PDF is being used for layout/design and corporate identity purposes only and the purchase order information does not need to be editable on the PDF.

The client would be using Acrobat  Reader (in their browser) to view and print the PDF.

The user will be anyone in the world - so no client DSN connections are possible.

They would also at times need to save the PDF with all information so that they can email it.

This is on a shared hosting environment, so installing server upgrades is probably not going to be permitted.

I am working with a php programer - but I need to find the right direction for her to follow (no experience with pdf forms) so a sample would be very helpful.

Is this even possible?

Thanks VERY much for your time.

jim

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

20-04-2009

So if I understand your requirement your PHP program will extract the data from the database and display the results as an HTML page that you need to turn into a PDF. If this is correct then there is no need for database connectivity software on the client as your PHP is taking care of that. What you need is an ability to turn the HTML page into a PDF. There are two ways that I know of to do this:

1. Adobe Acrobat - you could point Acrobat at your PHP URL and the results would be turned into a PDF. You cannot legally load Acrobat on your server and automate it. This means each user woudl have to have a copy (making this solution undesirable in your case)

2. LiveCycle PDF Generato (PDF/G) - This is a server based product that is used to automate the creation of PDFs. It actually calls the same libraries that Acrobat uses (they have been modified to run safely on the server). Your PHP program could call PDF/G pass the results and have a PDF generated that can be returned to the browser. This is server based software and is priced as such.

I am sure there are other solutions out there (as PDF is a standard) but I am not aware of any others that i woudl recommend.

Hope that helps

Paul

Avatar

Avatar
Level 1
jne_digi
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
jne_digi
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
jne_digi
Level 1

20-04-2009

Paul, thanks so much for your quick reply.

I will look into LiveCycle PDF Generator for server requirements and pricing (I fear that it will be cost prohibitive)

More of a gripe than a question (my apologies in advance):
It just seems to me that if LiveCycle PDF forms can read XML then why can't a path (absolute URL) be used as a parameter while creating the form and then when the PDF is opened in the browser (Acrobat Reader) it looks for the XML (via the URL parameter) and inputs the form data. That sounds so simple I am sure it can not be done - I guess then Adobe would not be able to sell as much server software.

Again, thanks for your input!!

jim

Avatar

Avatar
Level 1
azar123
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
azar123
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
azar123
Level 1

18-05-2009

hi ,

     i am new to it .. and i am also having the same problem , if i try the sample too....

    sry... my english is not good...

   is any help iam trying everthg this problem also rise in AcroDB too

Avatar

Avatar
Level 1
azar123
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
azar123
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
azar123
Level 1

18-05-2009

azrdin@yahoo.com it my ID

Avatar

Avatar
Validate 25
Level 2
mmgiath
Level 2

Likes

6 likes

Total Posts

321 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 2
mmgiath
Level 2

Likes

6 likes

Total Posts

321 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
mmgiath
Level 2

22-10-2009

Hi Paul, is it possible to send these  samples that show how to get a SQL statement into the connection ?

printshop@baycrest.org

Thanks

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

22-10-2009

Those samples are posted in an early post on this thread. You should be able to grab them from there.

Paul

Avatar

Avatar
Level 1
Luca_Macagnino
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Luca_Macagnino
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
Luca_Macagnino
Level 1

17-11-2009

Hi Paul,

i'm trying to connect a SQL server DB using you code:

when open the form i still get the message "Connection failed becuse the

environment is not trusted" and when clicking on button i get the error:

GeneralError: Operation failed.

XFAObject.setAttribute:7:XFA:data[0]:#subform[0]:Button1[0]:click

Method: 'setAttribute' cannot be called because doing so would violate this document's permissions settings.

(I'm using Designer version 8.1.2)

Please help me (i'm going crazy with this!)

Regards

Luca