Update dataset not working

  • Thread starter Thread starter Ade Majek via .NET 247
  • Start date Start date
A

Ade Majek via .NET 247

What is wrong?

I cant get data to update in MSAccess or MS-SQL when I change data in a bind control.

If I call the update method nothing happens to my changed data unless I navigate away from the record then call the update method. Is this normal?

Problem after changing data, code 1 below does not update database but code 2 does

Code 1)
daPersonnel.Update(dsPersonnel, "tblPersonnel")

Code 2)
BindingContext(dsPersonnel, "tblPersonnel").Position += 1
daPersonnel.Update(dsPersonnel, "tblPersonnel")
 
I think you need to call EndCurrentEdit
http://msdn.microsoft.com/library/d...mwindowsformsbindingmanagerbaseclasstopic.asp .
If that doesn't do it for you - let me know

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
Ade Majek via .NET 247 said:
What is wrong?

I cant get data to update in MSAccess or MS-SQL when I change data in a bind control.

If I call the update method nothing happens to my changed data unless I
navigate away from the record then call the update method. Is this normal?
 
Back
Top