?
Solved

OleDbDataAdapter.Update

Posted on 2016-08-26
3
Medium Priority
?
65 Views
Last Modified: 2016-09-09
I'm using an OleDbDataAdapter.  When I call OleDbDataAdapter.Update, I don't see my changes in the database.    How do I debug this?  Where can I see the error code/info?
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 11

Accepted Solution

by:
CraigYellick earned 1000 total points
ID: 41772090
I routinely use the SQL Server Profiler to monitor what is actually sent from the client to the server. What is probably happening is that the UPDATE statement is valid (that is, does not throw any errors) but the WHERE condition is false so nothing actually gets updated. If the statement is based on a primary key, the parameter that provides the key value might be NULL, which would not throw an error but would not update anything.
0
 
LVL 20

Assisted Solution

by:ElrondCT
ElrondCT earned 1000 total points
ID: 41776705
The OleDbDataAdapter returns an integer for the number of rows updated. So

dim Result as Integer = OleDb1.Update(MySet)

will show you whether it's trying to send any information. I suspect Craig is right that there's something about the WHERE condition that's causing nothing to be sent, but this will confirm that.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 41791493
Thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question