Difference between revisions of "HowTo:Update Data via OLEDB with a Workflow"
Line 1: | Line 1: | ||
− | + | Updating data in an Oracle database via a workflow can be done by using a set of activities. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | = Introduction = | |
− | + | # Establish a [[HowTo:Connect_To_Oracle_With_A_Workflow|OLEDB connection to an Oracle database]]. Once connected, it is necessary to model the table / column definitions, of the data to be udpated, in the workflow. | |
− | + | # Use [[CreateOLEOracleScope (Activity)|CreateOLEOracleScope]] activity to set up the connection. | |
− | + | # Place either a [[CreateOLETableScope (Activity)]] or a [[CreateOLEQueryScope (Activity)]] within the scope acticity to define the table you want to udate data. | |
− | + | {{Attention|If you are using a CreateOLEQueryScope to fetch data you want to update, you '''have to''' define a valid tablename!}} | |
+ | # Iterate throw the fetched rows by using e.g. a '''for each''' activity. | ||
+ | # Once you determine the row to be updated, use [[OLEEditRow (Activity)]] to start editing. | ||
+ | # Define the primary key column(s) by using [[EditOLEValue (Activity)]] activities within OLEEditRow. You need to specify the column name in the '''DisplayName''' property and the data type in the '''DataType''' property. Check the '''IsPrimary''' checkbox for all columns defined in this step (key columns). | ||
<br/> | <br/> | ||
− | {{Attention|The primary key column | + | {{Attention|The primary key column '''must be defined''' when updating data via OLE DB.}} |
− | + | # Define the data column(s) to be updated by using EditOLEValue activities within the OLEEditRow. Again, you need to specify the column name in the '''DisplayName''' property and the data type in the '''DataType''' property. Specify the '''new value''' for the cell in the property '''Value'''. | |
− | + | ||
− | + | ||
− | + | ||
− | + | =Examples= | |
− | + | Connecting to an Oracle database and updating data. | |
− | Connecting to | + | [[File:Example_Workflow_ORACLE_UPDATE_STATEMENT.uwf|220px|border|alt=Example Workflow|Example Workflow]] |
− | + | ||
[[File:UI_Activity_UpdateViaOLEDB.PNG|440px|border|alt=Example Workflow|Example Workflow]] | [[File:UI_Activity_UpdateViaOLEDB.PNG|440px|border|alt=Example Workflow|Example Workflow]] | ||
− | |||
[[Category:OLE]] | [[Category:OLE]] | ||
[[Category:Workflow]] | [[Category:Workflow]] | ||
[[Category:How-To]] | [[Category:How-To]] |
Revision as of 09:53, 11 February 2015
Updating data in an Oracle database via a workflow can be done by using a set of activities.