Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 February 8th, 2006, 11:56 AM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Object Reference not set to an instance of object

Hi friends,
          This post is regarding deleting row in datagrid.

code in datagrid1_deletedCommand


1. dataSet11=new DataSet1();
2. DataSet1.T_POTT_PROJECT_MASTERRow dr;
3. long key=Convert.ToInt64(DataGrid1.DataKeys[e.Item.ItemIndex]);
4. dr=this.dataSet11.T_POTT_PROJECT_MASTER.FindByPRJ_ SL_NO(key);
5. dr.Delete();
6. oleDbDataAdapter1.Update(dataSet11);
7. oleDbDataAdapter1.Fill(dataSet11);
8. DataGrid1.DataBind();

when i gone through the Debug mode i observed that dr is undefined value


After Executing it is displaying
System:NullReferenceException
Object Reference not set to an instance of object


Help me fast i just stucked................
Thank in advance






Similar Threads
Thread Thread Starter Forum Replies Last Post
Object reference not set to an instance of an obj. Dwizz VB.NET 2002/2003 Basics 8 June 1st, 2005 08:28 AM
Object Reference is Not Set to an Instance of an O blackinwhite General .NET 4 February 1st, 2005 05:42 AM
Object reference not set to an instance... steelman BOOK: ASP.NET Website Programming Problem-Design-Solution 6 May 7th, 2004 02:03 AM





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