Greetings,
I have a textbox that is bound to a dataset. The dataset is populated by a data adapter which pulls data from a table in the database.
When I change the value in the textbox, I cannot get that change to be recorded in the database. It looks to me like what I have done should work; here it is:
'fill my dataset
daPS.Fill(DsPS1)
'bind the textbox to the field in the dataset
txtArea.DataBindings.Add("Text", DsPS1.Tables("Project_Summary"), "Project_Area")
'later (in the close event), after changes were entered
dsChanges = DsPS1.GetChanges()
'Update dataset
daPS.Update(dsChanges)
For some reason, the GetChanges() is returning nothing, even though I changed the box contents. Why?
Is there a better way to bind a textbox to a table field?
The only thing I can think of that is a little odd, is that the type of my data in the textbox is text, but it is numeric in the database. Could that cause my problem?
Thanks for any help,
Draug
I have a textbox that is bound to a dataset. The dataset is populated by a data adapter which pulls data from a table in the database.
When I change the value in the textbox, I cannot get that change to be recorded in the database. It looks to me like what I have done should work; here it is:
'fill my dataset
daPS.Fill(DsPS1)
'bind the textbox to the field in the dataset
txtArea.DataBindings.Add("Text", DsPS1.Tables("Project_Summary"), "Project_Area")
'later (in the close event), after changes were entered
dsChanges = DsPS1.GetChanges()
'Update dataset
daPS.Update(dsChanges)
For some reason, the GetChanges() is returning nothing, even though I changed the box contents. Why?
Is there a better way to bind a textbox to a table field?
The only thing I can think of that is a little odd, is that the type of my data in the textbox is text, but it is numeric in the database. Could that cause my problem?
Thanks for any help,
Draug