Fill data in textBox
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
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

p.jones132 reputationPosted Aug 4, 2004, 6:45 AM EDT
mahmud_uk47 reputationPosted Aug 4, 2004, 6:58 AM EDT