J
JohnFol
I have followed one of the walkthroughs that shows a parameterised query
populating some text boxes that are data bound to a data set. The full
details are found at
http://msdn.microsoft.com/library/d...gdatainwindowsformusingparameterizedquery.asp
All this works, however I now want any changes made to the text boxes to be
written back to the db. I know I need the following to write the changes
back to the db:
OleDbDataAdapter1.Update(DsAuthors1, "authors")
However the way to get the values of the text boxes into the dataset seems
cumberson. I have done the following, but surely there must be an easier way
as an association between the dataset/table/field has already been
established.
Dim iPos As Integer
iPos = Me.BindingContext(DsAuthors1, "authors").Position
DsAuthors1.Tables("authors").Rows(iPos)("au_LName") = Me.txtAuthorLName.Text
Any Ideas?
populating some text boxes that are data bound to a data set. The full
details are found at
http://msdn.microsoft.com/library/d...gdatainwindowsformusingparameterizedquery.asp
All this works, however I now want any changes made to the text boxes to be
written back to the db. I know I need the following to write the changes
back to the db:
OleDbDataAdapter1.Update(DsAuthors1, "authors")
However the way to get the values of the text boxes into the dataset seems
cumberson. I have done the following, but surely there must be an easier way
as an association between the dataset/table/field has already been
established.
Dim iPos As Integer
iPos = Me.BindingContext(DsAuthors1, "authors").Position
DsAuthors1.Tables("authors").Rows(iPos)("au_LName") = Me.txtAuthorLName.Text
Any Ideas?