It's throwing an exception. Here's how i've altered the code:
Dim table3 As Data.DataTable = Me.Lists.NewCustomers
Dim dvtable2 As New DataView(Me.Lists.TPCustomer)
Dim dvtable3 As New DataView(table3)
For i As Short = 0 To Me.Lists.NewCustomers.Rows.Count - 1
dvtable3(i)("CCode") = dvtable3(i)("CCode").ToString +
dvtable2(i)("CCode").ToString()
dvtable3(i)("Cname") = dvtable3(i)("Cname").ToString +
dvtable2(i)("Cname").ToString()
dvtable3(i)("Caddress") = dvtable3(i)("Caddress").ToString
+ dvtable2(i)("Caddress").ToString()
dvtable3(i)("CPhone") = dvtable3(i)("CPhone").ToString +
dvtable2(i)("CPhone").ToString()
Next
DataGridView1.DataSource = table3
The excepiton is:
'Cannot set column 'cname'. The value violates the MaxLength limit of
this column.'
In the above code, Me.Lists Is the dataset that holds both table
adapters.
Both table fields for Cname are set to nvarchar(50) .
Any ideas?
Ben