Hi,
in coding it shows the following error.please do the needful.
Error:
Conversion failed when converting the nvarchar value 'HB001' to data type int.
public partial class UpdateCustomerInvoice : Form
{
int id2=1;
}
public void getgriddata()
{
DataTable dt = new DataTable();
SqlConnection con = new SqlConnection("data source=mars-104;initial catalog=marsweb;integrated security=true");
con.Open();
SqlCommand sqlcmd = new SqlCommand("select particulars,quantity,perprice,amount from tbl_report1 where orderno=@invoiceno", con);
SqlDataAdapter sqlda = new SqlDataAdapter(sqlcmd);
sqlcmd.Parameters.AddWithValue("@invoiceno", id2);//here it passes the id2 value =1
sqlda.Fill(dt);//error:sqlexception was unhandled
GridView1.DataSource = dt;
txt_customeraddress.Text = "";
}
Best,
Sudheep.