Jump to: navigation, search

Difference between revisions of "HowTo:Update Data via OLEDB with a Workflow"


Line 3: Line 3:
 
= Instructions =
 
= Instructions =
 
# 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.
 
# 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.
+
# Use [[Activity: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.
+
# Place either a [[Activity:CreateOLETableScope (Activity)]] or a [[Activity:CreateOLEQueryScope (Activity)]] within the scope acticity to define the table you want to udate data.
 
# Iterate throw the fetched rows by using e.g. a '''for each''' activity.
 
# 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.
+
# Once you determine the row to be updated, use [[Activity: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).
+
# Define the primary key column(s) by using [[Activity: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).
 
# 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'''.
 
# 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'''.
  

Revision as of 12:06, 23 February 2015

Updating data in an Oracle database via a workflow can be done by using a set of activities.

[edit]

Instructions

  1. Establish a 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.
  2. Use CreateOLEOracleScope activity to set up the connection.
  3. Place either a CreateOLETableScope (Activity) or a CreateOLEQueryScope (Activity) within the scope acticity to define the table you want to udate data.
  4. Iterate throw the fetched rows by using e.g. a for each activity.
  5. Once you determine the row to be updated, use OLEEditRow (Activity) to start editing.
  6. 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).
  7. 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.
IC Attention.pngIf you are using a CreateOLEQueryScope to fetch data you want to update, you have to define a valid tablename!
IC Attention.pngThe primary key column must be defined when updating data via OLE DB.

Example

Connecting to an Oracle database and updating data.
Example Workflow
Example Workflow ORACLE UPDATE STATEMENT.uwf