472,145 Members | 1,589 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 6858
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
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.