469,283 Members | 2,297 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,283 developers. It's quick & easy.

VB.NET and Data Adapter Update Method Not "Updating"

I have a VB .NET application that is communicating properly with an Access DB. I have a slew of textbox controls bound to a dataset and when the application launches, the fields are correctly populated.

If someone changes a value in one of the text boxes, I need to have a button capture the change and commit the update to Access. I know I'm close, but something is missing. I have a data adapter called:
OleDbDataAdapter1

and a dataset called:
DsMyMonthlyIncome1

My button function is:
Try
OleDbDataAdapter1.Update(DsMyMonthlyIncome1)

Catch ex As Exception
MsgBox(ex.ToString)
End Try

No error occurs, but the changed information in the text field never gets communicated to the Access DB. Have I not captured the changes by having the textbox controls bound?

I've searched quite a bit today, and not found the information I seek. I am lost here and appreciate the help.
Jan 10 '07 #1
6 6765
Anybody help me here?
Jan 11 '07 #2
Anybody help me here?

Anyone at all...
Jan 12 '07 #3
Anyone at all...
Seriously, no waiting :-)
Jan 13 '07 #4
pooba,

Does the updates involve updating several tables within the database? If so, then you need to update the tables one at a time, by adding the name of the table to the update parameters:

OleDbDataAdapter1.Update(DsMyMonthlyIncome1, "tableName")

I hope this helps
Jan 18 '07 #5
This messed me up for quite a while. Basically VB creates a temp file at run time when in the developer mode. There is a good explanation at this URL:
https://blogs.msdn.com/smartclientdata/archive/2005/08/26/456886.aspx
Jan 31 '07 #6
All I needed to do is something like this before doing the update:

Dim cm As CurrencyManager
cm = DirectCast(BindingContext(DsMyMonthlyIncome1, "Budget Items"), CurrencyManager)
cm.EndCurrentEdit()

-Dan

This messed me up for quite a while. Basically VB creates a temp file at run time when in the developer mode. There is a good explanation at this URL:
https://blogs.msdn.com/smartclientdata/archive/2005/08/26/456886.aspx
Jan 31 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

53 posts views Thread by Oliver Fromme | last post: by
6 posts views Thread by =?Utf-8?B?S2Fp?= | last post: by
2 posts views Thread by Mike Gleason jr Couturier | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.