Jyoti Jodha

Jyoti Jodha

  • NA
  • 1.7k
  • 407k

how to get id value From Table in text box c#? windows app

Apr 20 2017 1:16 AM
con.Open();
SqlCommand cmd = new SqlCommand("select Description,Tax_ID, Unit_id from Product where Name= '" + producttxt.Text + "'", con);
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read())
{
ProductExists = 1;
dectxt.Text = sdr.GetString(0);
txtqty.Text = sdr.GetString(2);
txttax.Text = sdr.GetString(1);
ProductExists = 1;
}
con.Close();
 
How to Get  Tax_ID & Unit_ID  his Values   from Tax And Unit Database table......???
 
 

Answers (4)