By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,281 Members | 2,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,281 IT Pros & Developers. It's quick & easy. 2003 " System.NullReference Exception "

P: 50
i got error " An unhandled exception of type 'System.NullReferenceException' occurred in " when i run my 2003 with Sqlserver 2000 server program , the same program is working fine in Other PCs ..

can someone give solve my Problem?

Thanx in Adv
Jul 13 '08 #1
Share this Question
Share on Google+
2 Replies

P: 57
null reference exception meansyou are most likely trying to access a member or method of a null object.

Maybe you can use try - catch blocks in your code and log the error. there is not enough information here to debug your code.

catch(Exception ex)
log(ex.toString());//write a logging message or even just pop up a message box.
this should give you the line number where the exception was thrown and then you can more easily find your null object.
Jul 15 '08 #2

Expert 5K+
P: 7,872
Step through the program and find the exact line that throws the null reference exception.
Then come back and post the bits of related code, noting which line caused the error. We might be able to pick out more from seeing that.
Jul 15 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.