You've got to place the text value into the dataset column for a given
row...
DataSet.Tables( "tableName").Ro ws(whichRowToWo rkWith).Item("c olumnName") =
textbox.text
You also need to make sure your DataAdapter has a valid (and correct)
update, delete and insert statement associated with its commands.
The fact that the textbox is bound does not mean that if you change its
value the dataset will immediately change, you have to manually update the
dataset with the value from the textbox.
"John Rose" <jo*******@yaho o.com> wrote in message
news:eU******** ******@TK2MSFTN GP10.phx.gbl...
How do you do that?
Actually the Button1_Click event is:
//---------------------------------------
private void Button1_Click(o bject sender, System.EventArg s e)
{
sqlDataAdapter1 .Update(dataSet 21);
}
//---------------------------------------
"Scott M." <s-***@BADSPAMsnet .net> wrote in message
news:el******** ******@TK2MSFTN GP12.phx.gbl... Where are you taking the data from the textbox and placing it into the
dataset?
"John Rose" <jo*******@yaho o.com> wrote in message
news:Ob******** ******@TK2MSFTN GP09.phx.gbl... I have one databound TextBox on a page with one button. The TextBox loads the correct SQL record data but typing a new string into the Textbox fails to change the DataSet. Any ideas? There must be some way to force
the edited TextBox to update the DataSet since it appears to not be done
automatically.
//--------------------------------------------------------------------------
--------------------------
private void Page_Load(objec t sender, System.EventArg s e)
{
sqlDataAdapter1 .Fill(dataSet21 );
Page.DataBind() ;
}
//--------------------------------------------------------------------------
--------------------------
private void Button1_Click(o bject sender, System.EventArg s e)
{
//dataSet21.Accep tChanges();
DataSet ds = dataSet21.GetCh anges();
sqlDataAdapter1 .Update(dataSet 21);
}
//--------------------------------------------------------------------------
--------------------------