multiple assign : Cannot assign


I want to assign multiple variables like that , my aim is write data to datatable . How can I resolve it . Thank you a lot

HI @hmduy

Try like this

Cint(row(4).Tostring)

Regards
Gokul

Hi @hmduy

Try adding .ToString in the quantity value like Cint(row.item(4).ToString)

Or Try Cint(Row(4).ToString)

Regards
Sudharsan

verify that the convertion to int is possible of the 4th element

Hi @hmduy ,

Could you make sure that the Qty variable is of the data type Integer ? Else If the Datatype is String, then you could convert the value to String as well like below :

Cint(row.item(4).ToString).ToString

Let us know if it doesn’t work.

Hii @hmduy
If your Variable “Qty” is of string type then use CInt(row(Item4).ToString).ToString

otherwise if your variable “Qty” is of type integer then use CInt(row(Item4).ToString)

Regards,
Armila