I am working with C# and I can input data that I want into two columns into a SQL database with an application but the issues is the database needs to stay
not null and I would like the rest of the fields to be
automatically fill in. How would I do that?
This is what I got
Id
CarSerialNumber
KindOfCar
CreateWho EditDate
EditWho
1
923432
Chev
Null
Null
Null
cmd =
new SqlCommand("Insert Into dbo.repaircars
(CarSerialNumber, KindOfCar ) VALUES (@CarSerialNumber,@ KindOfCar)", con);
cmd.Parameters.Add("@CarSerialNumber",
textBox1.Text);
cmd.Parameters.Add("@KindOfCar",
textBox2.Text);
cmd.ExecuteNonQuery();
What I need to happen for this table for this SQL database is this without adding textbox3, textbox4. How would I do that?
Id
CarSerialNumber
KindOfCar CreateWho
EditDate
EditWho
1
923432
Chev
kbsmith
2019-04-06 13:29:34.392
bbc\kbsmith