Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 9th, 2009, 10:40 PM
Authorized User
 
Join Date: Dec 2007
Location: , , Vietnam.
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
Post Object reference not set to an instance of an object.

Hello verybody !

I have taken more time to check the code.I know that it work fine on my localhost but on the work it does not work. in few month ago, it still work fine.I do not why i met this error.

If you have know about this, please help me to fix this,
Thanks all things
Best Regards
Phuc Hoang
  #2 (permalink)  
Old August 9th, 2009, 11:16 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Without code, is hard to tell you anything about the problem.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
  #3 (permalink)  
Old August 9th, 2009, 11:26 PM
Authorized User
 
Join Date: Dec 2007
Location: , , Vietnam.
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
Default

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 30: object [] parvalue = {0,pageIndex,10};
Line 31: SqlDbType [] sqldbType = {SqlDbType.Int,SqlDbType.Int,SqlDbType.Int};

Line 32: DataTable dt = NData.DTProccess._getDT("spResSelect", parName, parvalue, sqldbType, ref total);
Error here
Line 33: dlRes.DataSource = dt;
Line 34: dlRes.DataBind();
  #4 (permalink)  
Old August 11th, 2009, 03:30 AM
Registered User
 
Join Date: Sep 2008
Location: ChangNing,ShangHai ,China .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hi.huangls
Default

Check your database whether connected the server.
  #5 (permalink)  
Old August 11th, 2009, 09:11 PM
Authorized User
 
Join Date: Dec 2007
Location: , , Vietnam.
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
Default

I have also checked database (that run in the localhost) by access the IP.It work fine.
I do not why i met this eror

Thanks for relying me
Phuc Hoang
  #6 (permalink)  
Old August 14th, 2009, 10:56 AM
Authorized User
 
Join Date: Aug 2009
Location: India
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to amitranjan286 Send a message via Yahoo to amitranjan286
Default

You are getting a null reference exception that means something is coming null out of the db. Put a breakpoint here and add watch for all possible values.
Also replicate the existing database with localhost database where your are getting exception.
Some time while parsing if you are getting 0 , then it will throw the same exception
 


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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 13 pg448: Object reference not set to an instance of an object tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 August 8th, 2009 06:14 AM
Object reference not set to an instance of object iceman90289 ASP.NET 3.5 Basics 1 March 1st, 2009 05:13 AM
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 is Not Set to an Instance of an O blackinwhite General .NET 4 February 1st, 2005 05:42 AM



All times are GMT -4. The time now is 10:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.