Changes

HowTo:Update Data via OLEDB with a Workflow

1,918 bytes added, 08:02, 29 January 2015
Created page with "First you need to establish a OLEDB Connection t o a Oracle Database. See [[HowTo:Connect_To_Oracle_With_A_Workflow]] for details. <br/><br/> Once we are able to connect we st..."
First you need to establish a OLEDB Connection t o a Oracle Database.
See [[HowTo:Connect_To_Oracle_With_A_Workflow]] for details.
<br/><br/>
Once we are able to connect we start modelling the data structures we want to udpate in the workflow editor.
<br/>
1. Use a "CreateOLEOracleScope" Activity to configure the connection.<br/>
2. Place either a "CreateOLETableScope" or a "CreateOLEQueryScope" inside the scope acticity to define the table you want to fetch data from.<br/>
<br/>
{{Attention|When you are using a CreateOLEQueryScope to fetch data you want to update, you "have to" define a valid tablename!}}

3. Iterate throw the fetched rows by using e.g. a FOR - EACH activity.<br/>
4. Once you found the row you want to update, use an "OLEEditRow" to make it editable.<br/>
5. Define the primary key data structure by placing "EditOLEValue" activities inside the OLEEditRow. Yoe need to specify the column name in the "DisplayName" property and the data type in the "DataType" property. Check the "IsPrimary" checkbox as this column is the key column.<br/>
<br/>
{{Attention|The primary key column "must be defined" when updating data via OLE DB.}}

6. Define the data cells you want to update by placing "EditOLEValue" activities inside the OLEEditRow. Yoe 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 evaluation property "Value".<br/>


'''Example Workflows:'''
<br/><br/>
Connecting to oracle DB and reading data with a CreateOLETableScope: [[File:Example_Workflow_ORACLE_UPDATE_STATEMENT.uwf|220px|border|alt=Example Workflow|Example Workflow]]
<br/><br/>
[[File:UI_Activity_UpdateViaOLEDB.png|440px|border|alt=Example Workflow|Example Workflow]]
<br/><br/><br/>



[[Category:How-To]]
[[Category:Workflow]]
[[Category:UBIK Studio]]
[[Category:Activities]]
[[Category:Interfacing]]
[[Category:OLE]]
1,579
edits