Highlighted

Script for getting data from database

Avatar

Guest

03-09-2008

i wanted to know if there is a way in LiveCycle where I can have a submit button on a form and have two or more empty fields on the form and with a click of the submit button the empty fields would get filled with information collected from a particular database. I am sure there is coding/scripting involved and is it all attaced to the submit button or each field should contain some kind of coding as well. Or is there a different java platform that would be needed for this action to take place.

Replies

Highlighted

pguerett

04-09-2008

There is a facility using an OLE/DB connection from the form (running on Windows) to attach the DB to get data to populate the fields. I do not recommend doing this as you will need to set up and configure a Data Set Name (DSN)on each machine that will access the DB. If the DSN is not there then th ecommention cannot be made. This tends to become a maintainance nightmare as users do not understand how to set these up so IT Staff ends up having to do it.



The way to do this,without having to do anything on the client,is to set up a Web Service call that will get the data from the DB and deliver it to the client (when the button is pressed of course). If you have LiveCycle this is easily created. If you do not then most people will build a sevlet or a .Net app to do this. Then the form calls the Web Service and no configuration on the client is required.