Jump to content

A Column Named 'xxxxx' Already Belongs To This Datatable.


Recommended Posts

Posted

duplicate column names unnai report viewer lo..when exporting to csv, 'A column named 'xxxx' already belongs to this DataTable.' error kodtundi..anyideas ?

Posted

When Exporting to CSV? 

 

help 

Posted

Is it through SSRS. If so it is known issue. You cannot have multiple columns with same names. Alias the names of the columns with different ones and it will work fine. gallery_8818_14_67870.gif

Posted

Is it through SSRS. If so it is known issue. You cannot have multiple columns with same names. Alias the names of the columns with different ones and it will work fine. gallery_8818_14_67870.gif

it is not ssrs., it it rdlc report viewer. column name on table different ichadu kani description same pettadu..so adi issue.

Posted

Similar concept, rename the column to a different name.

 

it is not ssrs., it it rdlc report viewer. column name on table different ichadu kani description same pettadu..so adi issue.

 

Posted

Similar concept, rename the column to a different name.

its gonna be a db change... .net side nunchi em cheyalema?

Posted

before adding columns to the table just do this venu-3.gif


        If (table.Columns.Contains("Column-name-you-are-about-to-add")) Then
            'Set column name to whatever you want
            Columnname = Columnname + "1"
        End If
Posted

 

before adding columns to the table just do this venu-3.gif


        If (table.Columns.Contains("Column-name-you-are-about-to-add")) Then
            'Set column name to whatever you want
            Columnname = Columnname + "1"
        End If

5 times undi bhayya 

 

Posted

 

before adding columns to the table just do this venu-3.gif


If (table.Columns.Contains("Column-name-you-are-about-to-add")) Then
'Set column name to whatever you want
Columnname = Columnname + "1"
End If

5 times undi bhayya 

 

 

5 times unte loop petti 5 times rename cheyyakapoav

 

i  = 1;

If (table.Columns.Contains("Column-name-you-are-about-to-add"))
{
Columnname = Columnname + i.ToString();

i++;
}

Posted

5 times unte loop petti 5 times rename cheyyakapoav

 

i  = 1;

If (table.Columns.Contains("Column-name-you-are-about-to-add"))
{
Columnname = Columnname + i.ToString();

i++;
}

tried this....everytime i=1 aitundi ga...so always it will be caluname1 -- duplicate antundi baa

Posted

tried this....everytime i=1 aitundi ga...so always it will be caluname1 -- duplicate antundi baa

 

 

Ok. everytime i =1 ante adhi paina loop lo ledhemo.

 

How about this.

 

If (table.Columns.Contains("Column-name-you-are-about-to-add"))
{
Columnname = Columnname + table.columns.count.ToString();
}

Posted

pandaga chesko...number keeps changing based on the columns venu-3.gif

If (table.Columns.Contains("Column-name-you-are-about-to-add")) Then
'Set column name to whatever you want
Columnname = Columnname + table.Columns.Count
End If
Posted

GP..dint see this venu-3.gif

Ok. everytime i =1 ante adhi paina loop lo ledhemo.

 

How about this.

 

If (table.Columns.Contains("Column-name-you-are-about-to-add"))
{
Columnname = Columnname + table.columns.count.ToString();
}

 

×
×
  • Create New...