Write Line: Object reference not set to an instance of an object

While m doing a write line activity to read the row number i m getting this error

Hi @Swagasmini_Jena

did you assign 0 to rowNumber before loop?

I guess here the rowNumber is null thats why your facing this error try to assign
some row index value to rowNumber before the loop

1 Like

can you tell me the steps for it

Just add one assign activity before the loop starts like this

1

but the condition wont satisfy

1

how it can increment the next values.

Hi @Swagasmini_Jena

Remove .tostring from the write line

regards
gulshiyaa

no removing tostring is not helpful.getting the same error

this type of error appears when we do not initialize

in this case,initialize rownumber to 0 or 1 before while loop

1 Like

HI @Swagasmini_Jena,

1.Please check that the rowNumber value is should not be negative.

2.It should not be double precision value…

Cheers.
Vashisht.

1 Like

okay then keep like this

rownumber set default value as 0

If you find it useful mark it as solution and close the thread.

regards
gulshiyaa

1 Like

yes done

error2
thanks

if the answer works, pls mark it as solution

why the execution stops immediately without writing the execution time n the statement

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.