I am trying to copy records in my db from from 1 row to another .
I have a relation db, there I have 1 customer table With primarykey called CustomerID, 1 Ordertable with OrderID as Primarykey and OrderID as foreignkey.
then I have several Processtables all connected with orderID as foreignkey.
Now I want to copy all records connected to Order1 into Order2
When I start my program the tableadapters fill my dataset and my tables.
then I tried to insert into the ordretable the values allready in the tableadapter .
But I don't think I can do it the way I thougt.
The code I tried looks like this:
Is there a way to update or insert the values allready in the adapter into a row where the OrderId allready is set?
I have a relation db, there I have 1 customer table With primarykey called CustomerID, 1 Ordertable with OrderID as Primarykey and OrderID as foreignkey.
then I have several Processtables all connected with orderID as foreignkey.
Now I want to copy all records connected to Order1 into Order2
When I start my program the tableadapters fill my dataset and my tables.
then I tried to insert into the ordretable the values allready in the tableadapter .
But I don't think I can do it the way I thougt.
The code I tried looks like this:
VB.NET:
Dim OrdreTableAdapter As New Kalkyle1DataSetTableAdapters.OrdreTableAdapter
OrdreTableAdapter.Insert(OrdreID, @Ordedato, @Kalkyle_opprettet, @Leveringsdato, @Virkelig_leveringsdato, @Hovedtegningnr, @Ordre.Produkttype, _
@Materialtype,@Konstruktordato, @Kalkyle_utarbeidet, @Etterkalkyle_utarbeidet, @Tegningsrevisjon,MaxKundeID, @Status)
Is there a way to update or insert the values allready in the adapter into a row where the OrderId allready is set?