Hope everyone are ok, i need your help as i am trying to insert value into a MS SQL table but i am facing a problem as i have a primary column which is AdsID and its value type is Int and its identity increment.
PLEASE: when you answer can you explain in Simply and detailed as i am not professional one in c#.
the error message is: Line: 940 Error: Sys.WebForms.PageRequestManagerServerErrorException: Cannot insert the value NULL into column 'UID', table 'Berava.dbo.ads'; column does not allow nulls. INSERT fails. The statement has been terminated.
and behind code is:
protected void addadsbtn_Click(object sender, EventArgs e)
{
SqlConnection cn = new SqlConnection(sc);
SqlCommand cmd = new SqlCommand();
string sqlstatment = "INSERT INTO ads ( CateAct, State, City, AdsTit, AdsDesc, AdsPrice, Img1, img2, img3, img4, img5, Wtags) VALUES ( @CateAct, @State ...
Go to the complete details ...