I am trying to understand how to perform an insert to a table and I'm using the AdventurWorks database with a C# DataGridView. The picture below shows what I have so far. That is, I am able to load the table into my DataGridView.
I am new to this stuff so I don't know what the particulars are from here. I could read umptine articles on this subject from the Internet but I'm hoping somebody could provide the code that will work with what I have.
The code I have so far is seen in the snippet below. What code (a method to call) is necessary to add one person with these fields:
[FirstName] [dbo].[Name] NOT NULL,
[LastName] [dbo].[Name] NOT NULL,
[EmailPromotion] [int] NOT NULL CONSTRAINT
[PasswordHash] [varchar](40) NOT NULL,
[PasswordSalt] [varchar](10) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT
[ModifiedDate] [datetime] NOT NULL CONSTRAINT
For right now, I'm not worried about cell validation. I can open another question for that later.
Thanks in advance
public partial class Form1 : Form
private void Form1_Load(object sender, EventArgs e)
// TODO: This line of code loads data into the 'adventureWorksDataSet.Contact' table. You can move, or remove it, as needed.