Linq query help

Cannot set column ‘robot name’. The vaule violates the maxlength limit of this column.

I’m using linq query here.

Hi @Arya_Squares

I think there might be some spaces or unnecessary characters.
Use .trim() at the end of linq query to remove spaces.

Hope it helps!!

It’s not because of extra space…it occured because of

I used group by function where it will add multiple column vaule in one column

Ex : column 1 as

Abcdef1
Abcdef2
Abcdef3
Abcdef4

It will append like this

Abcdef1,abcdef2,abcdef3,abcdef4

It is failingg because it is not able to appened mutliple vaule in a same column and throwing exception…

Hi @Arya_Squares ,

Could you let us know what is the Datatable prepared for populating the data ?
If prepared with Build Datatable activity , can you check what is the length value for the column ?
If not -1 , can you change it to -1 and check ?

We are recieving data from data base

How did you implement that?

Do you have an Add Data Column activity in which you are adding LINQ results? If so in the properties of the Add Data Column change the max length property.

If you are populating your datatable in some other way i suggest you build your own datatable that will be of same structure as your incoming populated datatable, but you will set desired properties of each column yourself.

We are receiving vaule from data base,

How can we change that

we assume that the datatable is used directly or was a copy/clone from another one.

Before executing the LINQ give a try at
Assign Activity
dtData.Columns(ColNameOrIndex).MaxLength = -1

-1 no length limit OR use a limit, long enough

Demo:
grafik

Docu:

1 Like

@Arya_Squares

Can you tell what is the group by you are using or how you are using?

Also are you trying to add data to any column? If so it is important check the limit

Cheers

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