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
mahmud_ukPosted Aug 4, 2004, 10:58 AM
p.jonesPosted Aug 4, 2004, 10:45 AM