R
R. G.
I get the following error intermittenly when attempting to fill my
dataset in an ASP.NET project:
Object reference not set to an intance of an object.
Exception Details: System.NullReferenceException: Object reference not
set to an intance of an object.
The code I'm running in the page_load event and looks like this:
userNamesDA.Fill(userNamesDS, "userNames")
I'm using an Access database located on the same machine hosting my
app, a 2.4 Ghz, 512 MB, Compaq EVO Workstation running Windows XP Pro.
The error comes up about 5% of the time while in debugging mode. It
doesn't seem to occur as often in production, but the system hasn't
been tested all that extensively yet since its still in development.
When the error does come up, refreshing the page takes care of the
problem. I've also had the same error occurr while performing the
same operation against a Sybase database, and again, it seems to be
intermittent.
Any ideas what's causing this? I have a feeling that the connection
to the database is not being established before the call to fill the
dataset is executed.
Is there anyway to test whether that connection is "live" before
executing the Fill method? Or could the problem be hardware since I'm
not running the application off a Windows Server optimized to handle
these kinds of applications? I'm just frustrated with the
inconsistancy of the problem. If it happened all the time, I would
have a better chance of debugging it.
dataset in an ASP.NET project:
Object reference not set to an intance of an object.
Exception Details: System.NullReferenceException: Object reference not
set to an intance of an object.
The code I'm running in the page_load event and looks like this:
userNamesDA.Fill(userNamesDS, "userNames")
I'm using an Access database located on the same machine hosting my
app, a 2.4 Ghz, 512 MB, Compaq EVO Workstation running Windows XP Pro.
The error comes up about 5% of the time while in debugging mode. It
doesn't seem to occur as often in production, but the system hasn't
been tested all that extensively yet since its still in development.
When the error does come up, refreshing the page takes care of the
problem. I've also had the same error occurr while performing the
same operation against a Sybase database, and again, it seems to be
intermittent.
Any ideas what's causing this? I have a feeling that the connection
to the database is not being established before the call to fill the
dataset is executed.
Is there anyway to test whether that connection is "live" before
executing the Fill method? Or could the problem be hardware since I'm
not running the application off a Windows Server optimized to handle
these kinds of applications? I'm just frustrated with the
inconsistancy of the problem. If it happened all the time, I would
have a better chance of debugging it.