this Higlight Code Working For Me
try
{
data.openDBConnection();
SqlCommand cmd = new SqlCommand("Sp_RegisterVehicle", data.getDatabaseConnection());
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@ActionType", "SaveData");
cmd.Parameters.AddWithValue("@id", SqlDbType.Int).Value = empid;
cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = txt_firstname.Text;
}
int numres = cmd.ExecuteNonQuery();
if (numres > 0)
{
MessageBox.Show("Data Saved Successfully ", "Vehicle Register", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Data Saved Failed", "Vehicle Register", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
DialogResult = MessageBox.Show("Error" + ex.Message);
}
finally
{
data.closeDBConnection();
}
But I Will try Single Parmerters three diffrent textbox value Save In Single Table Colums For Example
this is Example of Name
1.John
Clark
Davide
I Want To Save Like this on Single Parmeter but i have 2 more txetBox
cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = txt_firstname.Text;
cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = txt_firstname1.Text;
cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = txt_firstname2.Text;
Save In Single ID but colums Format
1.txt_firstname.Text = value John
txt_firstname1.Text = Clark
txt_firstname2.Text = Davide
i want to save like this image

Muhammad Imran AnsariPosted Mar 4, 2022, 5:00 AM
Guest UserPosted Mar 3, 2022, 8:31 AM
Muhammad Imran Ansari your are wirte here is my store proc
Muhammad Imran AnsariPosted Mar 2, 2022, 9:14 PM
Guest UserPosted Mar 2, 2022, 8:00 PM
Sachin SinghPosted Mar 2, 2022, 5:14 AM
Nitin SontakkePosted Mar 2, 2022, 5:08 AM