Error Message: 'Option Strict On disallows late binding'

Hi, :slightly_smiling_face:
I tried to automate a master data creation in SAP. A data table with several columns and rows is to be automatically entered in SAP. My problem is that in the invoke workflow, which should create the entries in SAP in a loop for the individual lines, the following error message appears: “Option Strict on” disallows late binding. I followed the workflow from the video tutorial “Project Organization”. Can someone tell me where and what my error is?

The variable has the following form: DataRow(counter)(“Column name”).ToString
(the same like in the video tutorial)

On the picture you can see my Workflow:

Thank you! :slightly_smiling_face:


To be able to access the row specific column, please change the syntax to

Hello, thank you for your help. However, the same error message still appears. Do you have any other idea what might be causing this?

Hi @fbz,
Since you’re using a Datarow object, you should be using it as:

Please see screenshot for reference:
Try to print that value before passing as an argument to validate the values are coming along well.

DataRow can only have the column in parentheses, but you are trying to use a counter also.
The options you have are to use the DataTable variable with the counter or use the Datarow without the counter.

For example,

DataRow("Column name").ToString
ExtractDataTable.Rows(n)("Column name").ToString

Typically, you will be using a For each loop with the DataTable, which you don’t need to declare a DataRow in the variables tab if that is the case.

For example,

For each row In ExtractDataTable

// then either use Assign activities or place the variables in that Scope and assign them with the Default value.
// But, the default value will only work once the row variable is declared at the start of the For each loop

There are times however where you would use a Do While loop and use a counter to reference the DataRow. In this case, then you would want to assign the DataRow either in the Default value with a Scope after the DataTable has been set or using an Assign activity.

For example,

n = 0
Extract Structured Data to ExtractDataTable
    Assign DataRow = ExtractDataTable.Rows(n)
    n = n + 1
While n <= ExtractDataTable.Rows.Count

Anyway, I hope this extra bit of information is helpful.