It appears that you are trying to copy the contents of a DataTable (Out_Dt) to another DataTable (Dt_New). However, you are encountering an error because one of the values from the Out_Dt exceeds the MaxLength property of the corresponding column in Dt_New.
Assign Dt_New.columns(“col1”).maxlength=-1
To resolve this issue, you should make sure that the MaxLength property of the columns in Dt_New are either set to -1 (which means no limit) or set to a value that is equal to or greater than the maximum length of the corresponding columns in Out_Dt.
First : Get the data from sql server (using Query) stored Out_Dt
Second : Convert the all the columns datatype into System.Object in for each activity.
Thrid : After converted All columns datatype to object… try add values from (Out_Dt) while adding the values i got error in Col1 MaxLenth Limit of this Columns.
We cannot change datatype of Column if data exists in the column.
The above workflow doesn’t change data type of columns of Out_Dt because ForEach iterates Out_Dt.Clone
For now, can you try to add Dt_Out.Columns("RQ_VALUE").MaxLength = -1 just before the Assign of the LINQ?
I have 126 Columns cant able mention individual columns Name one by one. so that can i use one more for each activity to iterate the all the columns max length as -1