|
-
February 14th, 2003, 03:18 PM
#1
Simple question
I'm trying to update a textbox that is bound to a dataset. However, I can't update this by using the textbox1.text property. How can I update this?
-
February 14th, 2003, 04:17 PM
#2
I figured out how to assign it to the data set but I can't get the data set to update that change in the field to the database. Any help would be really appreciated.
-
February 14th, 2003, 04:32 PM
#3
More info
You might have to give some more details.
I'm assuming you are filling a database with:
SqlDataAdapter.Fill(myDataSet)
or
OleDbDataAdapter.Fill(myDataSet)
to reflect the changes you need to call
SqlDataAdapter.Update(myDataSet)
or
OleDbDataAdapter.Update(myDataSet)
The update function takes all change/add/deletes from the dataset and makes them in the database.
Hope that helps. If not, you'll need to give some more information and possibly show some code.
DG.
-
February 14th, 2003, 04:51 PM
#4
Here's the code that I use to update the Field:
Me.BindingContext(objdsMort, "Mortgage").Current.row.item("Principal") = strNew
'Then to update the database:
Me.BindingContext(objdsMort, "Mortgage").EndCurrentEdit()
objDataSetChanges = CType(objdsMort.GetChanges, AMT.dsMort)
Me.OleDbConnection1.Open()
OleDbDataAdapter1.Update(objDataSetChanges)
Me.OleDbConnection1.Close()
objdsMort.Merge(objDataSetChanges)
objdsMort.AcceptChanges()
I am filling the database with OleDbDataAdapter.Fill(myDataSet).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|