Hi Brian,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you were unable to save data on a
dataform wizard generated form with your own code. If there is any
misunderstanding, please feel free to let me know.
In your last post, you mentioned that you were calling EndEdit method on
the DataSet. However, as far as I know, DataSet doesn't have such method.
Are you calling the EndEdit on the DataRow or calling EndCurrentEdit on
CurrencyManager?
Based on my experience, the failure of EndEdit calling might be caused by
getting an incorrect binding context from the data source. Please make sure
you have given the correct data source, data member and property name for
the binding context.
HTH. If the problem persists, could you please paste your code here?
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
You were correct in your guess, but translating it into useful
information was quite difficult for me. It was only by Googling this
group, looking for EndCurrentEdit complaints that I hit on something
useful.
I created the databindings using the property grid (which I should
really wean myself away from) so they were written to the module as:
Control.DataBindings.Add("Text", dsDataSet, "TableName.ColumnName")
However, when updating I was using the syntax
BindingContext(dsDataSet.TableName).EndCurrentEdit()
This, apparently (and very subtly) is not the same bindingcontext as
the one used to bind the controls. Changing the preceding statement
to:
BindingContext(dsDataSet, "TableName").EndCurrentEdit
Preserves my data nicely.
Whew. Just goes to show you an elegant paradigm in the language
doesn't always make for intuitive programming. =P
Brian Link, Minnesota Countertenor