Jump to: navigation, search

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


Line 3: Line 3:
 
<br/><br/>
 
<br/><br/>
 
Once we are able to connect we start modelling the data structures we want to insert into the DB in the workflow editor.
 
Once we are able to connect we start modelling the data structures we want to insert into the DB in the workflow editor.
<br/><br/>
 
1. Use a "CreateOLEOracleScope" Activity to configure the connection.
 
<br/><br/>
 
2. Place either a "CreateOLETableScope" or a "CreateOLEQueryScope" inside the scope acticity to define the table in which you want to insert data into.
 
<br/>
 
{{Attention|When you are using a CreateOLEQueryScope to fetch data you want to create, you '''have to''' define a valid tablename!}}
 
  
4. Use an "CreateOLERow" to insert a new datarow into the table.
+
<ol>
<br/><br/>
+
<li>Use the [[Activity:CreateOLEOracleScope (Activity)]] to configure the connection.</li>
5. Define all the data fields you want to insert data by using "EditOLEValue" activities inside the CreateOLERow. 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 evaluation property "Value".
+
<li>Place either a [[Activity:CreateOLETableScope (Activity)]] or a [[Activity:CreateOLEQueryScope (Activity)]] inside the scope acticity to define the table in which you want to insert data into.</li>
<br/><br/>
+
{{Attention|When you are using a CreateOLEQueryScope to fetch data you want to create, you '''have to''' define a valid tablename!}}
5. Define the primary key data structure by placing "EditOLEValue" activities inside the OLEEditRow. You 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.
+
<li>Use an "CreateOLERow" to insert a new datarow into the table.</li>
<br/>
+
<li>Define all the data fields you want to insert data by using "EditOLEValue" activities inside the CreateOLERow. 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 evaluation property "Value".</li>
 +
<li>Define the primary key data structure by placing "EditOLEValue" activities inside the OLEEditRow. You 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.</li>
 
{{Attention|For inserting data '''you must not''' define the primary key column. Do not check the "IsPrimary" property!}}
 
{{Attention|For inserting data '''you must not''' define the primary key column. Do not check the "IsPrimary" property!}}
<br/>
 
  
'''Example Workflows:'''
+
= Example =
<br/><br/>
+
 
Connecting to oracle DB and creating data : [[File:Example_Workflow_ORACLE_INSERT_STATEMENT.uwf|220px|border|alt=Example Workflow|Example Workflow]]
 
Connecting to oracle DB and creating data : [[File:Example_Workflow_ORACLE_INSERT_STATEMENT.uwf|220px|border|alt=Example Workflow|Example Workflow]]
 
<br/><br/>
 
<br/><br/>

Revision as of 11:57, 23 February 2015

First you need to establish a OLEDB Connection t o a Oracle Database. See Connect To Oracle With A Workflow for details.

Once we are able to connect we start modelling the data structures we want to insert into the DB in the workflow editor.

  1. Use the CreateOLEOracleScope (Activity) to configure the connection.
  2. Place either a CreateOLETableScope (Activity) or a CreateOLEQueryScope (Activity) inside the scope acticity to define the table in which you want to insert data into.
  3. IC Attention.pngWhen you are using a CreateOLEQueryScope to fetch data you want to create, you have to define a valid tablename!
  4. Use an "CreateOLERow" to insert a new datarow into the table.
  5. Define all the data fields you want to insert data by using "EditOLEValue" activities inside the CreateOLERow. 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 evaluation property "Value".
  6. Define the primary key data structure by placing "EditOLEValue" activities inside the OLEEditRow. You 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.
  7. IC Attention.pngFor inserting data you must not define the primary key column. Do not check the "IsPrimary" property!
    [edit]

    Example

    Connecting to oracle DB and creating data : Example Workflow ORACLE INSERT STATEMENT.uwf

    Example Workflow




Retrieved from "https://wiki.augmensys.com/index.php?title=HowTo:Insert_Data_via_OLEDB_with_a_Workflow&oldid=12728"