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

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

14-10-2008

When you create the connection in the Dataview by default the connection to the dB will happen when the form is loaded. Hence it will return the 1st record. In the data connection definition there is a delayed open checkbox on the last panel. If you check this off then you can control when the data connection happens. I have some samples that show how to get a SQL statement into the connection and cause it to open. If you post your email address I will send it to you.

Avatar

14-10-2008

Ive made my email address visable. Anything you can send me would be much appreciated.

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

14-10-2008

Just sent it

Avatar

Avatar
Validate 1
Level 7
kc
Level 7

Likes

0 likes

Total Posts

402 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 7
kc
Level 7

Likes

0 likes

Total Posts

402 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
kc
Level 7

09-12-2008

Hi again Paul,



Could you share the code with me as well - or on the forum?



Sincerely

Kim

kc(at)dafolo.dk

Avatar

Avatar
Validate 1
Level 7
kc
Level 7

Likes

0 likes

Total Posts

402 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 7
kc
Level 7

Likes

0 likes

Total Posts

402 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
kc
Level 7

09-12-2008

Hi again,



I have been fidling a little with "things", but I still haven't found what I am looking for.



I found one of your older posts with this essential content:



-----



1. First lets change the connection to accept a sql command instead of connecting and getting all records:



xfa.sourceSet.DataConnection.nodes.item(1).query.setAttribute("text", "commandType");



2. Now lets set the SQL command we want to execute:



xfa.sourceSet.DataConnection.nodes.item(1).query.select.nodes.item(0).value="Select * from Parts Where PART_NO = " + TextField1.rawValue;



3. Now we are ready to open the connection:



xfa.sourceSet.DataConnection.open()



-----



However I can't make it work in Acrobat 9, I get an error telling me the following:



GeneralError: Operation failed.

XFAObject.open:6:XFA:form1[0]:#subform[0]:Button1[1]:click

Connection for Source DataConnection failed because the environment is not trusted.



What can I do to go around this.



Sincerely

Kim

Avatar

11-12-2008

Hi Paul,



Could you share the code with me as well my adress david.dol2007@yahoo.fr - or on the forum?



Thinks

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

12-12-2008

Just sent it

Avatar

Avatar
Level 1
_Anthony_Idigo_
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
_Anthony_Idigo_
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile
_Anthony_Idigo_
Level 1

18-12-2008

Hi Paul,



Here is my issue and I hope you can help.

I want to have a submit button on a form, that when clicked by the user can take the data and add it the database table which i made the connection to and of which the fields in the form were based on. Could you help with this or direct me to somewhere I can follow. It would be much appreciated.



Thanks,



Anthony

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

19-12-2008

What type of Database is it? In most cases you will need to do two operations. One is to create the new record in the DB and 2 update the record that was just added using the update() method.