Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 3.5 SP1 Edition: In C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 3.5 SP1 Edition: In C# and VB by Bill Evjen, Scott Hanselman, and Devin Rader; ISBN: 9780470478264
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 3.5 SP1 Edition: In C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 13th, 2009, 04:32 PM
Registered User
 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Application is crashing while assigning to DataRow

Please look at the following code:

Vals contains 2 fields and non empty

DataRow[] dr = m_dsOptions.Tables["TABLE"].Select("ID = '" + vals[0] + "'");
if (dr.Length <= 0) // name is not in list
{
DataRow newRow = m_dsOptions.Tables["TABLE_OPTIONS"].NewRow();
newRow[0] = vals[0];
newRow[1] = vals[1];
m_dsOptions.Tables["TABLE_OPTIONS"].Rows.Add(newRow);
}
else if (1 == dr.Length) //&& dr[0][0] == vals[0])
{
dr[0][1] = vals[1];
SG:----------^ while assign the new data to the table I am getting exception. Please let me know if I am writing the code correctly
}
  #2 (permalink)  
Old July 9th, 2010, 02:28 PM
Authorized User
Points: 71, Level: 1
Points: 71, Level: 1 Points: 71, Level: 1 Points: 71, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2009
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

What's the exception?


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET crashing usamaalam ASP.NET 2.0 Professional 1 June 7th, 2008 04:44 PM
VS2008 Crashing? BigTallCampbell Visual Studio 2008 2 May 13th, 2008 10:05 PM
Form Localization crashing software! Help! greggorob64 Visual Studio 2005 0 August 15th, 2007 10:01 AM
crashing problems with dwmx2004 to dw4 thecatat Dreamweaver (all versions) 13 May 2nd, 2004 07:27 PM
Database constantly crashing. izchan VB Databases Basics 2 June 5th, 2003 01:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.