Highlighted

OLEDB Dataconnection and XML Schema

_jerome_dinnat_

16-06-2008

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 😄

Replies

Highlighted

pguerett

17-06-2008

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?
Highlighted

_jerome_dinnat_

17-06-2008

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
Highlighted

pguerett

17-06-2008

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?
Highlighted

_jerome_dinnat_

17-06-2008

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 🙂 .
Highlighted

pguerett

17-06-2008

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).
Highlighted
Highlighted

pguerett

17-06-2008

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?
Highlighted

_jerome_dinnat_

17-06-2008

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
Highlighted

pguerett

17-06-2008

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.