Expand my Community achievements bar.

xfa.sourceset.dataconnection.add() is not working

Avatar

Level 2

Hello All,

I am trying to insert data into database using "xfa.sourceset.dataconnection.add()" as shown in tutorial. However, the value is not inserted into DB and the PDF file is not throwing any errors.

I did try update, last, first, etc., all the function are working but only add is not working.

Can anyone please tell me where I am wrong?

FYI -I have change the dataconnection name to the name that I am using for dataconnection so this is not a problem.

Thanks

Viral

6 Replies

Avatar

Level 10

For Addnew the syntax is below..

xfa.sourceSet.DataConnection.addNew();

Refer to the documentation..

http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/wwhelp/wwhimpl/common/html/wwhelp.htm?conte...

Thanks

Srini

Avatar

Level 2

Hello Srini,

I am using correct syntax as given in liveDocs but it not working. I mistyped the syntax in the discussion. Sorry for confusion....

In addition, if i click the "Delayed Open" in connection properties then none of the button (addnew, update, delete, first, last, etc) works. I am wondering y?

I read in adobe form that I need to first use addNew() followed by update() to insert new record in DB...is that correct? I tried this too but it not working.

Thanks

Viral

Avatar

Level 10

Hi Viral,

    You are correct. You need to issue the addNew() method and then enter the data in the fields and then use the update() method.

    

     In the below forum link, Paul had explained on the dataConnection issues.

http://forums.adobe.com/thread/340124?start=0&tstart=0

Thanks

Srini

Avatar

Level 2

Hello Srini,

I tried the same example that works if the "Delayed Open" option in ADO properties (in new data connection) is not checked.

If i checked that option it not working..Please check the attached file.

In addition, I was wondering do we need Reader Extension to make forms talk to DB. If yes,how should I do it?

Thanks

Viral

Avatar

Level 10

Hello Viral,   

     To reader extend your form you have two options..

     One option is using Adobe Acrobat Pro which can provide only a subset of Reader Extensions (locally saving and Digitial Signatures).

     Attached image show you the menu option in Acrobat PRO to Reader extend the form..

     Other option is by purchasing a Reader Extensions service component from Adobe and use it at the time of rendering in the Livecycle Server. 

     This option provide the full Reader Extensions functionality(things like commenting, Database and web service access, etc..).

    

     since in your case you are trying with the Database connections, can you try with the second option.

Thanks

Srini

Avatar

Level 2

Hey Srini,

Thanks for information about Reader Extension.

I am still stuck with sending new data to database....