This should be easy but I can' t sort it out.
I created a database connection and cloned it so I could avoid security issues.
The cloned connection works fine and I can query for specific records and the bound fields are populated. The problem comes when I try to advance to the next record with "clonedDB.next()" for example. The error that says "clonedDB is not defined". This code is all in Java by the way.
So I though maybe I need to create an object variable to contain the clonedDB object; this is what I can't figure out how to do or if will solve my problem.
Thanks in advance!
Cheers,
Al
Solved! Go to Solution.
Views
Replies
Total Likes
Can you send me your form so I can have a look?
If the attachment ability is not available for you can you email it to LiveCycle8@gmail.com
Thanks
Paul
Views
Replies
Total Likes
Are you doing this in the same script or from a differnt script?
Paul
Views
Replies
Total Likes
Hi Paul,
If I understand your question correctly; I am trying to move to the next record in the record set from a button with the clonedDB.next() statement in the script. This button is not the same button I use to query the data connection for the record set.
Cheers,
Al
Views
Replies
Total Likes
The cloned set is only available while you are in that script. To go to the next record you woudl use:
xfa.sourceSet.YourDataConnectionName.next()
Paul
Views
Replies
Total Likes
Hi Paul,
I tried to use the next() command as you suggested but I get this error:
"next operation failed, because there was no connection specified"
Is it possible that because I cloned the dataconnection the script will not access the actual dataconnection?
If I can make a form variable and assign it to the cloned dataconnection I should be able to access it from any script on the form until I close the connection; I just don't know how to do it.
Cheers,
Al
Views
Replies
Total Likes
Can you send me your form so I can have a look?
If the attachment ability is not available for you can you email it to LiveCycle8@gmail.com
Thanks
Paul
Views
Replies
Total Likes
Hi Paul,
This works! To make the "Previous" record button work I just had to change the connection type to Dynamic and now I can move back and forth through the records.
Thanks a bunch!
Al
Views
Replies
Total Likes
Do you need an explanation of why it works or are you OK with what you have?
Paul
Views
Replies
Total Likes
I think I understand that the cloned DB you made into a form level variable
when the function initDB is called as the form is initialized (I think).
So the data connection object variable (myconnectionobject) exists as long
as the form is open and can be accessed from within other form objects and I
should have access to any of the data connection methods and properties when
referencing myconnectionobject variable.
Am I correct?
Cheers,
Al
Views
Replies
Total Likes
Yes ...
Paul
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies