S
Shan1986
Guest
Hi,
I am trying to import a row from one data table to another basically both data tables are same except one is a exported data table saved as XML so user can import part of the old data rows to new project. My data table has an auto increment column so xml also has these auto increment column. When importing rows to destination data table source auto increment column has a same id as destination one so i am getting error . How to ignore source values and auto increment with destination table?.
Dim num As Integer
If Integer.TryParse(treeNode.Name, num) Then
Dim dt = CType(EQ_BS.DataSource, DataTable) 'destination table
Dim Row = ImportedDS.Tables(dtEquipment).Select("ID = " & num)(0) 'table imported from XML
Row.Item(dtID) = Current_Selected_Node
Row.Item(dtEQID) = "" 'Autoincrement column
dt.ImportRow(Row)
End If
thanks
Continue reading...
I am trying to import a row from one data table to another basically both data tables are same except one is a exported data table saved as XML so user can import part of the old data rows to new project. My data table has an auto increment column so xml also has these auto increment column. When importing rows to destination data table source auto increment column has a same id as destination one so i am getting error . How to ignore source values and auto increment with destination table?.
Dim num As Integer
If Integer.TryParse(treeNode.Name, num) Then
Dim dt = CType(EQ_BS.DataSource, DataTable) 'destination table
Dim Row = ImportedDS.Tables(dtEquipment).Select("ID = " & num)(0) 'table imported from XML
Row.Item(dtID) = Current_Selected_Node
Row.Item(dtEQID) = "" 'Autoincrement column
dt.ImportRow(Row)
End If
thanks
Continue reading...