mahmud_uk

mahmud_uk

  • NA
  • 48
  • 0

Fill data in textBox

Aug 4 2004 8:00 AM
Hi Guys, I'm tring to retrive data from the database and fill them up in thier correct textbox. i,e, textBox1 should insert the product name etc .. Any idea how will i configure my code to do this: SqlConnection con = new SqlConnection (@"Data Source= xxxx;"+ "Initial Catalog = drmTest;" + "Network Library=DBMSSOCN;"+ "user id =xx;"+ "Password=xxl"); // assign conString String sQuery = "SELECT Name, Description, Price FROM License WHERE Name = '"+ textBox5.Text +"' AND LicenseID = '"+ textBox6.Text +"'"; Console.WriteLine(sQuery); SqlDataAdapter sqlDataAdapter1 = new SqlDataAdapter(sQuery,con); com.Clos() Do i insert this code anywhere sqlDataAdapter1.Fill( textBpx1, "License"); THANKS

Answers (2)