This is my first step to programming.guys your help hands required.I watched youtube video & write small program,the exact way he written..he doesn’t have error.but i got the error.I just passed the textbox values database.(error is database table definition wrong ). In my table i use for this field is BBMgrID nvarchar(50) NOT NULL
SqlConnection con = new SqlConnection("Data Source=spilap;Initial Catalog=spiDB;User ID=sa;Password=sa123");
protected void btn_submit_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("Insert into tbl_BBmgr values('" + TextBox1.Text+"')",con);
cmd.ExecuteNonQuery();
}
Try this :
Update :