Hi Everyone
I have used a drop down and a label. I want on the selection of the drop down data should be viewed on label.
ex: if user select value from drop down (Apple) so on label it should print (50 per KG)
Data should come from sqldata and I can't use join because there is no relationship between the two tables. Is there any other suggestion on how I can do this ?
2) i am using data grid view in that i want that user should typed manually address and then click on submit then data should save in sql server
the code i have written is giving me error
SqlConnection con = new SqlConnection(@"Server=NGENIOUS-WSSDEV\SQLEXPRESS;Database=MIC;Trusted_Connection= True");
con.Open();
SqlCommand cmd = new SqlCommand("insert into clientwiseproductwise(productcategory,discounttype,scount,Dfactor)values ('" + productcategoryDataGridViewTextBoxColumn + "','" + discounttypeDataGridViewTextBoxColumn + "','" + DiscountValue + "','" + dfactorDataGridViewTextBoxColumn + "')", con);
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Data Successfully Submitted");
if in insert statement i put @productcategory then it is telling me must declare variable
if i remove @
then the error is
String or binary data would be truncated.
The statement has been terminated.