Huh?
I have a dataset with a row that has been updated or inserted by the user
via a datagrid. I need to insert a value in one of the grids columns for each
row prior to saving the data. I am using ds.HasChanges to validate that
changes have occured and da.Update(Changes) to update the records. Below is
the update code:
Dim AllChanges As DataSet
If dsAnesthesia.HasChanges() = True Then
AllChanges = dsAnesthesia.GetChanges()
daAnesthesia.Update(AllChanges)
End If
All I want to do is programically insert a value into a bound datagrid
column prior to saving the row. How do I programically access a specific
column whenever the user is either adding or updating a record using a
datagrid.
--
Thanks, Jim
"Cor Ligthert [MVP]" wrote:
Jim,
I have a datagrid with a DataAdapter as the DataSource. The user fills in
their data for 3 columns and I want to programically add a value to the
4th
(invisible) column (employee number). That way when the user saves the
data I
can use the data already in the datagrid.
Typically the user will add several rows before the DataSet.HasChanges is
called and the DataAdapter.Update(AllChanges) is called. I want to add an
employee number to each record programmically within this save routine.
Yeah,
stupid, but I need the answer to complet this project.
I really don't want to use a DataReader and write the SQL UPDATE or INSERT
commands, this needs to be done for about 30 tables and I don't have the
time.
--
And why can you not make this?
(Especially the text acceptchanges is interesting by the way, normally you
don't need that with a dataadapter, so show some code around that)
I hope this helps,
Cor