p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ADO.NET 2: Programming with SQL Server 2005, Oracle, MySQL ISBN: 0-7645-8437-5
This is the forum to discuss the Wrox book Professional ADO.NET 2: Programming with SQL Server 2005, Oracle, and MySQL by Wallace B. McClure, Gregory A. Beamer, John J. Croft IV, J. Ambrose Little, Bill Ryan, Phil Winstanley, David Yack, Jeremy Zongker; ISBN: 9780764584374

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ADO.NET 2: Programming with SQL Server 2005, Oracle, MySQL ISBN: 0-7645-8437-5 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 8th, 2006, 11:36 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Reference not set to an instance of object srinivas_chakka ASP.NET 1.0 and 1.1 Professional 0 February 8th, 2006 11:56 AM
Object reference not set to an instance of an obj. Dwizz VB.NET 2002/2003 Basics 8 June 1st, 2005 09: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 03:03 AM
Object reference not set to an instance of an obje aashishpatil ASP.NET 1.1 1 October 8th, 2003 10:17 AM



All times are GMT -4. The time now is 01:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc