Hi
c#
I have dropped a data grid on a windows form and it displays the data from my table Ok. However, when I edit a
row and click save I then the message "Update requires a valid UpdateCommand when passed DataRow collection
with modified rows."
This is my table:
CREATE TABLE [dbo].[Orders](
[OrderNumber] [int] IDENTITY(1,1)PRIMARY KEY,
[insertday] [int] NOT NULL,
[Details] [char](40) NULL,
[Description] [char](40) NULL,
[debit] [tinyint] NULL,
[virtual] [tinyint] NULL,
[CreditAccountNumber] [int] NULL,
[DebitAccountNumber] [int] NULL,
[Startdate] [datetime] NULL,
[FirstAmount] [decimal](5, 2) NULL,
[Amount] [decimal](5, 2) NULL,
[totalpayments] [int] NOT NULL,
[remainingpayments] [int] NOT NULL,
[autoinsert] [tinyint] NULL,
) ON [PRIMARY]
Could someone tell me what the fix is here please?
1. WHERE do I set the update statement?
2. What does would update statement look like in this case?