if you are at this level/in this phase you should be using the code behind- you will want to look at
this class for more info... but let's say you had a SQL table...
Code:
tbl_Demo
Col 1 -- PK -- INT -- not null
Col 2 -- fName -- varchar(10) -- null
Col 3 -- Age -- INT -- not null
and then these SQL procs (insert and then update)
Code:
CREATE PROC usp_ins_Demo @fName varchar(10), @Age int = 18
AS
INSERT INTO tbl_Demo (fName, Age)
VALUES (@fName, @Age)
CREATE PROC usp_updt_Demo @fName varchar(10), @Age int = 18
AS
UPDATE tbl_Demo
SET Age = @Age
WHERE fName = @fName
*note you should not use a first name as an index, you should use a key, but for example purposes...
and then you would want to call code with the following
*let's say for example sake there are two text boxes "txt_fName" and "txt_Age"
Code:
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmdA = new SqlCommand("usp_ins_Demo", conn);
cmdA.CommandType = CommandType.StoredProcedure;
cmdA.Parameters.Add(new SqlParameter("@fName", txt_fName.Text));
cmdA.Parameters.Add(new SqlParameter("@Age", txt_Age.Text));
*and similar logic for the update