Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics 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
 
Old May 29th, 2007, 03:15 PM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default P 675 addressList exercise

I get an object reference not set to instance of object exception being thrown here in this sample code. This is when I set a Messagebox right after the catch statement Is there any reason why this might happen ? and then right after that appears the following:
An unhandled exception of type 'System.ArgumentNullException' occurred in system.windows.forms.dll

Additional information: Value cannot be null.

My current XML file has no information missing in any of the fields.
It looks like this:

Code:
 <?xml version="1.0" ?> 
- <Address xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <FirstName>Christopher</FirstName> 
  <LastName>Mais</LastName> 
  <CompanyName>None</CompanyName> 
  <Address1>853 east 229 St</Address1> 
  <Address2> 1st fl</Address2> 
  <City>Bronx</City> 
  <Region>New York</Region> 
  <PostalCode>10466</PostalCode> 
  <Country>US</Country> 
  <Email>[email protected]</Email> 
  </Address>
 
Old May 31st, 2007, 03:55 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

The information you have provided is unhelpful. You have not given a clue as to what the code that throws the error is up to when you get this error.

You can increment a variable line by line as your Try part is running, and the value that this variable is left at when you enter the Catch will then give a clue what line is raising the error.

But at any rate, it will be hard to ascertain what is wrong with your code without knowing what the code is...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 Exercise 2 diango BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 4 February 1st, 2011 03:24 PM
Please, could anyone help me with this exercise? java2007 Java Basics 3 December 10th, 2007 12:19 PM
exercise solution uddessjava Java Basics 1 December 29th, 2005 04:57 AM
Exercise Solutions gsforfree BOOK: Beginning ASP.NET 1.0 3 June 28th, 2004 12:56 PM





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