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