Try this. Hope it works..
Using System.Data.SqlClient;
1.)
string constr ="server=your_server_name; DataBase=database_name; uid=; pwd=;" ;
SqlConnection conn = new SqlConnection(constr);
string cmdstr = "select *from table";
SqlDataAdapter da = new SqlDataAdapter(cmdstr,conn);
DataSet ds = new Dataset();
da.Fill(ds,"table");
Datatable dt = ds.Tables["table"];
dt.Rows[0][0] = TextBox1.Text;
con.Dispose();
2.)
Then Use the same code, just modify the statement:
TextBox1.Text = dt.Rows[0][0].ToString();