Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

OLEDB Dataconnection and XML Schema

Avatar

Former Community Member
Hi,



I create a form with fields binding with a OLEDB dataconnection.

It's work, I can request my database and store my data.



I want to be able to can access these field in a process (with workbench ES).

If I bind fields with a xml schema I can access to them and manipulate them but I can't bind them with a OLEDB dataconnection and a xml schema.



How can I do this ?



Thank you and I hope you could understand me :D
23 Replies

Avatar

Former Community Member
These bindings are on two different levels. The OLEDB connection bindings are set up such that when you connect to the DB and data is returned the bound fields get populated right away. These are called Import/Export Bindings and are located at the bottom of the Binding Tab (these bindings are fulfilled when an execute operation is done - i.e connect through OLEDB or execute a web service).



The other type of binding is called Default Binding and these are executed when the form is Opened, Saved or Submitted. These bindings affect what is being submitted. You can have both types of binding on a single object.



So if you want the data that is being retrieved from the data source to appear in your submission then you will have to bind the default binding to a node on the schema.



Make sense?

Avatar

Former Community Member
I understand but the Import/Export bindings offers me just web services and no oledb dataconnection :(



I understand the difference between the 2 levels and for me It make sense to bind a field with the two source but I can't do this in designer. Why Import/Export binding doesn't offer me a oledb dataconnection ?



I created no dataconnection on the form.



Thank you for your previous answer. It did help me.



Thanks

Avatar

Former Community Member
I see what you mean now ..... I think that because you are using a database connection that the thought is that you will be following the schema of the database and not a separate schema. The execute bindings are for web services only (where there is no schema defined).



If you have a separate schema that you want to use you can have hidden fields that bind to the DB, then when those fields get populated you can push the values into the real fields where they are bound to your other schema.



Make sense?

Avatar

Former Community Member
Yes, I will do that. I have hope there is another solution that creating hidden fields. It's too bad not to be able to use the fields binding with the database connection.



Thank you very much, you were a great help for me :) .

Avatar

Former Community Member
Just as a side note ...not many people use ODBC connections anymore - having to set up a DSN on each machine is too much....using a Web Service is a better technique (if at all possible).

Avatar

Former Community Member
I need to set up a DSN for each user of the process ? If I set up once on the server It would not work ? :'(

Avatar

Former Community Member
Ok now there is confusion .... your questions were about OLEDB connections from the form to the database. If you are running from the server then I would use the JDBC connections from the server to get the data then format it and use it as data to merge onto the template.



Have you set up the data connection in the form to run server side?



If that is the case then you only need to set up a DSN on the server....but I would be concerned about performance if you have a large number of forms beinng rendered.



Which type of DB is it and how much data are you retrieving?

Avatar

Former Community Member
Have you set up the data connection in the form to run server side?



- Yes, in the connection properties



If that is the case then you only need to set up a DSN on the server....but I would be concerned about performance if you have a large number of forms beinng rendered.



Which type of DB is it and how much data are you retrieving?



- It's a mysql database with only one table. There are 2500 entries in the table and 10 fields by entry. I need to retrieve 5 or 6 field by entries

Avatar

Former Community Member
Your technique will work but each time you render the form a database call is made from the server to the db ...it has to set up the call, retrieve the info, and tear down the call. If you have a large volume of forms being rendered performance may become an issue.

Avatar

Former Community Member
Ok thanks. You suggest me to use web services ? I know nothing about web services and I must create a specify web service and not use one already created. It could take me time to do that.



Thank you very much for having help me.

Avatar

Former Community Member
Hi,



I finally create a web service. It provides me informations about some users. I have a list of users defined by fields login, name and email.

I bind the login with a drop down list and the name and email with textfields.

When I preview my pdf, I can browse my list with my login but my fields name and email keep the same value and don't take the values associates.



Do I need to script to do that ? If you have an example or a link, it would be great.



Thank you

Avatar

Former Community Member
Ok finally I create two web service : one to populate my drop down list with users login and an other one to populate my field firstname, email and lastname when a login is choosen.



I don't know if this is the best practice.

Avatar

Former Community Member
Paul,



I have a problem which is sort of related to the topic. I have created a form in LC Designer, which I want to open filled in with some data from my database. What I am doing is:



an HTML link calls a PHP script that generates a XML; then the PDF form should open in another tab/window with the data contained in the XML. Well, I have generated a static XML file to work on this, and build an schema (XSD) file as well. Everything looks to be working fine (data connection, bindings), and when I preview the PDF in LC Designer I can actually see the table with repeating records and totals at the end. But, when I open the form in Adobe Reader or Professional it comes blank, with no data. I've been trying to write some script in the initialize event of the textfields to push some data on, but unsuccessfully. I have changed all possible configurations in the Form Properties without any success as well.



Any help on this would be much appreciated! :)



I can post or send all files if you want to have a look.

Avatar

Former Community Member
So if I understand you correctly you can see your data in the form when you Preview it from Designer (this is actually doing a merge operation when the PDF is created). But when you try to open the form from a native Acrobat/Reader there is no data....correct?

Avatar

Former Community Member
Exactly. I think that, on the Preview PDF tab(in LC), the merge operation that you mentioned is happening, but when I open the PDF in Acrobat/Reader this doesn't happen, so I only see the blank form.

Avatar

Former Community Member
The issue is that you need to either open the data once Acrobat and the form is loaded (Forms/Manage Form Data/ Import Data) or you can merge the data and the template with the server product called Forms which will then deliver the finished form to you.

Avatar

Former Community Member
hi Paul, thanks for the reply.

I did what you said and yes, I could see *some* of the data in my PDF. However, there is a repeating row in my table. In the Preview, I can see 3 lines with the different items. When I imported the data in Reader, only the 1st line came in.

Other question is: any change to import this data automatically? Scripting or something?

Appreciate your help, I am looking into the Forms product now.

Avatar

Former Community Member
Lets get the data in first then we will worry about automating it ...OK?



On the subform that is repeating can you tell me what the binding statement is?