473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

DataAdapter.Update() failure

My update is failing on the insert. I've got the call inside a try/catch
but the message is too crytic and I can't find the actual sql that is
being called on my behalf. Where and how can I get into the code that
is actually doing the update? All I can do is guess at what is wrong and
it's extremely frustrating. There have to be some better debugging
tools for these DataAdapter/DataSet classes.

sandman

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
2 1870
Max,

Can you post the exception details?

Also, you can see the insert statement by looking at the InsertCommand
property of the SqlDataAdapter instance you have. Once you have that, you
can check the CommandText property of the SqlCommand instance to get the
statement that is being executed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Max Sandman" <sa*********@yahoo.com> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
My update is failing on the insert. I've got the call inside a try/catch
but the message is too crytic and I can't find the actual sql that is
being called on my behalf. Where and how can I get into the code that
is actually doing the update? All I can do is guess at what is wrong and
it's extremely frustrating. There have to be some better debugging
tools for these DataAdapter/DataSet classes.

sandman

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #2
Off the top of my head, your problem could be that you don't have a
CommandBuilder object or a Command object for your insert. A snippet of
code that is giving you problems would be very helpful.

- Carl

"Max Sandman" <sa*********@yahoo.com> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
My update is failing on the insert. I've got the call inside a try/catch
but the message is too crytic and I can't find the actual sql that is
being called on my behalf. Where and how can I get into the code that
is actually doing the update? All I can do is guess at what is wrong and
it's extremely frustrating. There have to be some better debugging
tools for these DataAdapter/DataSet classes.

sandman

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: randy | last post by:
Hello all, I have a DataTable which I am building column by column and adding rows after each new column. The DataTable columns match the columns in my database table. I'm building the...
2
by: hch | last post by:
dataAdapter.Update(data, "TableName") won’t work! I was about to deploy my first website on the Internet only to discover that the dataAdapter.Update() throws the Server Error in the third...
6
by: Geoff Pennington | last post by:
I have a class method that returns a DataAdapter. I want to access the table(s) contained in the DataAdapter. Of course, accessing the DataSets would be good enough, because I could get the tables...
13
by: Doug Bell | last post by:
Hi, I thought I had this sorted this morning but it is still a problem. My application has a DataAccess Class. When it starts, it: Connects to a DB (OLE DB) If it connects it uses an...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
8
by: Zorpiedoman | last post by:
I keep getting a concurrency exception the second time I make a change and attempt to update a dataadapter. It appears this is by design, so there must be something I can do to avoid it. ...
7
by: Max | last post by:
I've included the needed tables in the DataSource. Those tables that are bound to controls I can workwith. But how do you get access to the DataAdaptors that are not bound? me.Dataset1.table...
6
by: Rich | last post by:
Dim da As New SqlDataAdapter("Select * from tbl1", conn) dim tblx As New DataTable da.Fill(tblx) '--works OK up to this point da.UpdateCommand = New SqlCommand da.UpdateCommand.Connection =...
3
by: Rich | last post by:
What is the diffeence bewtween a dataAdapter.InsertCommand and dataAdapter.SelectCommand (and dataAdapter.UpdateCommand for that matter)? Dim da As SqlDataAdapter conn.Open da.SelectCommand =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.