P
PartyFears
Dear All,
I have the following problem.
I have populated a datasset and bound the contents to varous text
fields defined in a page. I do this through running Me.Databind in
the Form_Load of the page concerned. The dataset will only contain
one table and one row within the table.
Up to this point everything is OK.
One the form is displayed, the user is free to change any of the
values. A button is supplied to submit the form at which point I want
to update the dataset and apply the changes to my datasource - at this
stage I'm not too sure whether this will be a SQL database or xml
file.
I know that I can [on postback] build the dataset again, get the
contents of each of the controls on the form and update the dataset
eg.
dim ds as Dataset
ds = buildDataset()
ds.tables(0).rows(0).item("ClientName") = txtClientName.text
ds.tables(0).rows(0).item("ClientAddress") = txtClientAddress.text
etc....
Ideally, I'm looking for a way to automatically update the dataset in
the same way that the databind function automatically updates the form
controls.
Is my example above the recommended way to do this or can it be done
more gracefully....
Thanks in advance,
Jan-Willem Wilson.
I have the following problem.
I have populated a datasset and bound the contents to varous text
fields defined in a page. I do this through running Me.Databind in
the Form_Load of the page concerned. The dataset will only contain
one table and one row within the table.
Up to this point everything is OK.
One the form is displayed, the user is free to change any of the
values. A button is supplied to submit the form at which point I want
to update the dataset and apply the changes to my datasource - at this
stage I'm not too sure whether this will be a SQL database or xml
file.
I know that I can [on postback] build the dataset again, get the
contents of each of the controls on the form and update the dataset
eg.
dim ds as Dataset
ds = buildDataset()
ds.tables(0).rows(0).item("ClientName") = txtClientName.text
ds.tables(0).rows(0).item("ClientAddress") = txtClientAddress.text
etc....
Ideally, I'm looking for a way to automatically update the dataset in
the same way that the databind function automatically updates the form
controls.
Is my example above the recommended way to do this or can it be done
more gracefully....
Thanks in advance,
Jan-Willem Wilson.