473,805 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

best way to debug

When I try to execute
dc.daOrders.Upd ate(ds.Orders)
I get:
Run-time exception thrown : System.FormatEx ception - Input string was not in
a correct format.
I think in my typed dataset/datatable one of the column's defaults must be
null or something and since the column type is string it is throwing that
error....But what makes no sense is if I iterate through all all the column
values prior to the update I can read each one with no error...The debugger
is really lame on this one I cannot see what column is throwing the error,
or if it is a parameter in the updatecommand, or where the problem is...Any
ideas to help me debug this?

Thanks,
Scott
--
Scott Emick
Programmer
Fox International
Remove the ham from mail address if it's not spam
Nov 21 '05 #1
1 1123
After tearing apart the sqlDataAdapter' s parameter objects, command objects
I deleted and recreated thedataadapter. That didn't help. Then I moved to
the xsd dataset, took all the xml for the column elements and pasted into
excel sorting the whole mess by datatype to make sure all the null value
settings a defaults were in order. I had manually added defaults of "" for
string types but then later set null value to be "" for string types.
Apparently adding the defaults is overkill. Removing those defaults got rid
of my errors!

Scott

"Scott Emick" <se****@ham.f ox-international.c om> wrote in message
news:OV******** ******@TK2MSFTN GP12.phx.gbl...
When I try to execute
dc.daOrders.Upd ate(ds.Orders)
I get:
Run-time exception thrown : System.FormatEx ception - Input string was not
in a correct format.
I think in my typed dataset/datatable one of the column's defaults must be
null or something and since the column type is string it is throwing that
error....But what makes no sense is if I iterate through all all the
column values prior to the update I can read each one with no error...The
debugger is really lame on this one I cannot see what column is throwing
the error, or if it is a parameter in the updatecommand, or where the
problem is...Any ideas to help me debug this?

Thanks,
Scott
--
Scott Emick
Programmer
Fox International
Remove the ham from mail address if it's not spam

Nov 21 '05 #2

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

Similar topics

5
28487
by: Matthew Louden | last post by:
I want to know what's the best way to debug ASP pages? Now, I just put the following code when I got run-time error, but sounds like not efficient. Please advice! Thanks! Response.Write "Here" Response.End
2
3416
by: Matt | last post by:
I want to know what's the best way to debug XSL? For example, I use XSL and XML for HTML generation. Now, I am just using web browser, and see if it works, and always it doesn't display anything. I really need a better way to debug and develop XSL. any ideas? please advise. thanks!!
13
6621
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
6
2147
by: Philip Warner | last post by:
I have a set of classes: C (base) C1 (inherits C) C2 (inherits C) ... Cn (inherits C) (the C1..Cn also have subclasses, but thats not really relevant to the question)
1
3020
by: balystyk | last post by:
Are there any possible issues with creating a base class (adding common properties) for a user control using a class file and not a user control (.ascx and code-behind) in asp.net 2.0? I have successfully tested using a class that inherits UserControl and it seems like the best way to go but a co-worker read somewhere that you shouldn't use a base class for user controls but to only use another user control for the base class. This...
0
1816
by: Ken Allen | last post by:
The MSDN documentation on remote debugging is a bit sparse, to say the least, and there is almost no information available on the 'best' way to configure this. I should note that my development system is Windows XP Pro and the test machine is Windows 2003, both running the latest upgrades; Visual Studio 2005 is installed on the development system and the .Net 2.0 framework is installed on the test system. The two systems do not have the...
4
3863
by: Darren Mar-Elia \(MVP\) | last post by:
So, I have my little .Net 2.0 C# utilities out in the wild and occasionally they have bugs(!). Often the bugs are easy to troubleshoot remotely but occasionally I would like to write detailed trace info to a simple text file that I could use to further track down the bugs. Additionally, somewhat related, it would be useful to be able to get the line number where an exception was thrown, which is slightly different than a debug log, but...
10
8039
by: Dieter Pelz | last post by:
Hallo, what is the best way to check the installation of mfc80 and vcrt sidebyside assemblies? Best Regards, Dieter Pelz
4
2899
by: =?Utf-8?B?bW9mbGFoZXJ0eQ==?= | last post by:
In VB6, we created a number of ActiveX DLLs that all shared a similar interface. The main application would load these in dynamically (late-bound.) This worked well for our situation because we could update the DLLs independently of the main EXE, and performance was not a problem. We want to do the same thing in C# (at least test it), but we are not exactly clear what the best practice is. We would prefer to do something similar, but we...
9
6637
by: | last post by:
In my database I have a 'control table' in which basic info is stored about the application, for instance the application's path and the name of the company that is using it. In all of the application's reports I have a page footer with an unbound field that retrieves and shows the name of the company. This is done by Dlookup. My question is: is Dlookup the best way to do this, performance wise, or is there a more efficient way? Thanks in...
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10105
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9185
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.