Jyoti Jodha

Jyoti Jodha

  • NA
  • 1.7k
  • 408.8k

Invalid column name in windows application c#

Jun 13 2017 1:28 AM
Invalid column name 'txt_billno'..in windows application c#
 
 
 
private int txt_billno(string p)
{
Int32 txt_billno = 0;
cmd = new SqlCommand(p, con);
con.Open();
txt_billno = (Int32)cmd.ExecuteScalar();
con.Close();
return txt_billno;
}


private void MainBillfrm_Load(object sender, EventArgs e)
{
int Billno = txt_billno("Select ISNULL(Max(txt_billno+1),1) From MainBillForm");

Answers (5)