Difference between revisions of "HowTo:Update Data via OLEDB with a Workflow"
(→Example) |
|||
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Updating data in an Oracle or SQL database via a workflow can be done by using a set of activities. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | = Instructions = | |
− | + | # Establish a connection [[HowTo:Connect_To_Oracle_With_A_Workflow|to an Oracle]] or SQL database. Once connected, it is necessary to model the table / column definitions, of the data to be udpated, in the workflow. Use [[Activity:CreateOLEOracleScope (Activity)|CreateOLEOracleScope]] or [[Activity:CreateOLESQLScope (Activity)|CreateOLESQLScope]] to set up the connection. | |
− | + | # 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. | |
− | + | # Once you determine the row to be updated, use [[Activity:EditOLERow (Activity)]] to start editing. | |
− | + | # Define the primary key column(s) by using [[Activity:EditOLEValue (Activity)]] activities within EditOLERow. 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 EditOLERow. 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'''. | |
− | + | {{Attention|If you are using a CreateOLEQueryScope to fetch data you want to update, you '''have to''' define a valid tablename!}} | |
− | + | ||
+ | {{Attention|The primary key column '''must be defined''' when updating data via OLE DB.}} | ||
+ | |||
+ | =Example= | ||
+ | Connecting to an Oracle database and updating data.<br /> | ||
+ | {{FileLink|Example_Workflow_ORACLE_UPDATE_STATEMENT.uwf|Download Workflow example}} | ||
− | |||
− | |||
− | |||
− | |||
[[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:How-To | + | [[Category:How-To|Update Data via OLEDB with a Workflow]] |
− | + | [[Category:OLE|Update Data via OLEDB with a Workflow]] | |
− | + | ||
− | + | ||
− | + | ||
− | [[Category:OLE]] | + |
Latest revision as of 09:18, 20 May 2015
Updating data in an Oracle or SQL database via a workflow can be done by using a set of activities.