Solved

OleDbDataAdapter.Update

Posted on 2016-08-26
3
62 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 250 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 250 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

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

724 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