im using this code to compare and get the common values in 2 data Tables but some time their are no common values in that case i m getting an error as above how can i move on when i received an error
(From x In output Join y In dt3 On x(“acc_no”).tostring Equals y(“LINE_DESCRIPTION”).tostring And x(" Amount").toString Equals y(“DR”).tostring
Select output.clone.LoadDataRow(New Object(){x(“Time”).tostring,x(" ID1").tostring,x(“TAmount”).ToString,x(" Ref Number").ToString,x(" PAN").tostring,x(“acc_no”).tostring,y(“GL_DATE”).tostring,y(“ATTRIBUTE2”).tostring,y(“LINE_DESCRIPTION”).tostring,y(“DR”).tostring,y(“CR”).tostring},False)).CopyToDataTable
Just share the error message and/or more other error details with us.
Had you also changed the variable datatype from datatable to List(of DataRow) after replacing CopyToDataTable to toList?