NullReferenceException Problem.

08/07/2012 05:49 killersub#1
Hey guys, I've been away quite a while but now I'm back.

Anyways, I wanted to try this 5535 source I had in my computer from a while back but it is giving me an error I can't quite manipulate.

This is the error line:
Code:
if (_dataset.Tables[Table].Rows.Count > _row)
This is the error itself:
Code:
Object reference not set to an instance of an object.
I have configured all there is to configure including the config.ini, Constants.cs, etc. I'm just not sure why this error is popping up at this time.

YES, I understand that the error is telling me that I'm trying to perform an action on something that is not yet assigned but I'm a little lost at what to assign seeing as everything is already assigned to its place.

I would very much appreciate the help, sorry for the "newbiness" but like I said I just got back and I need to start getting the hang of things once again.

Regards, Killersub.
08/07/2012 08:45 I don't have a username#2
_dataset is null or _dataset does not contain a table with the name from "Table", which results in a NullReferenceException.
08/07/2012 09:57 Korvacs#3
Come on... Try catch and a breakpoint ffs... Learn how to debug!
08/07/2012 10:02 I don't have a username#4
Quote:
Originally Posted by Korvacs View Post
Come on... Try catch and a breakpoint ffs... Learn how to debug!
Best way to debug is with fire.
08/07/2012 10:04 Korvacs#5
Depends on the bug..
08/07/2012 10:12 I don't have a username#6
Quote:
Originally Posted by Korvacs View Post
Depends on the bug..
[Only registered and activated users can see links. Click Here To Register...]
08/07/2012 19:39 killersub#7
Quote:
Originally Posted by I don't have a username View Post
_dataset is null or _dataset does not contain a table with the name from "Table", which results in a NullReferenceException.
Going to check that ASAP!

Quote:
Originally Posted by Korvacs View Post
Come on... Try catch and a breakpoint ffs... Learn how to debug!
I'm not that much of a newb lmao, I've tried those both things and nothing has shown up for me yet.

Anyways, thanks for the response; Going to try both of your examples.

By The Way, this error comes from the MySQLReader void "public void Read()".