TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Carter
NA
86
22.6k
Update not saving.
Aug 7 2010 7:30 AM
Thanks for your help in the past; Queries are now working and the output is fine.
Now my Updating command for the Database is playing with my mind. :-(
The following code appears to work. I can even close the program and restart it, noting that the changes appear to have been saved.
Try
Me
.Validate()
Me
.ProductAndUsesBindingSource1.EndEdit()
Me.Product_and_UsesTableAdapter1.Update(Me
.DataSet
1
.Product_and_Uses)
MsgBox(
" Update successful"
)
Catch
ex
As
Exception
MsgBox(
" Update failed"
)
End
Try
I get the Update Successful message but then later I come into the program and the changes have disappeared.
It's like the changes have been held in a temporary file but not updated the main database.
My reading tells me that the EndEdit should have fixed the problem but it hasn't.
I've tried using Me.Product_and_UsesTableAdapter1.Update(me.Dataset1) without the .Product_and_Uses, but that doesn't make a difference.
Thank you for your assistance.
David
Reply
Answers (
10
)
Database Query in VB
Trying to update GUI(Textbox) using another file in Vb.NET