SQL Errors: Object reference not set to an instance of an object.

SQL Errors: Object reference not set to an instance of an object.

Post by Andy Gree » Thu, 16 Jan 2003 00:54:25



Ok guys, I've been getting some really bizarre errors with my ASP.NET app.
The worst part is
that they are intermittent - they just pop up every once in a while...
generally more frequently when
there are more simultaneous users of the site.  Without going into too much
detail of the code just
yet, here is a stack trace with the errors:

at
System.Data.SqlClient.SqlConnectionPoolManager.ReturnPooledConnection(SqlInt
ernalConnection pooledConnection)
at System.Data.SqlClient.SqlConnection.Open()
at _30.fbDb..ctor() in C:\Documents and
Settings\XXX\VSWebCache\YYY\30\classes\fbDb.vb:line 27
at _30._default.BindData() in C:\Documents and
Settings\XXX\VSWebCache\YYY\30\wtf\default.aspx.vb:line 45
at _30._default.Page_Load(Object sender, EventArgs e) in C:\Documents and
Settings\XXX\VSWebCache\YYY\30\wtf\default.aspx.vb:line 41
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()

Essentially, the line in "fbDb.vb" is just the opening of an SQL connect
(ie, connection.Open())
Again, the problem is that it works 80% of the time... I can litterally hit
refresh... but then once or
twice out of every 10 times I'll get that error (there doesnt' seem to be
any real pattern to it).

Has anyone else experienced anything like this?  Do I have to use/declare my
SQLConnection objects in some special way?

Any help would be greatly appreciated - this has been plaguing me for
months, and upgrading to the latest drivers and the like has not helped
any...


 
 
 

SQL Errors: Object reference not set to an instance of an object.

Post by Kevin Spence » Thu, 16 Jan 2003 03:36:23


You need to post the CODE which raised the error.

HTH,

--
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Complex things are made up of lots of simple things.


Quote:> Ok guys, I've been getting some really bizarre errors with my ASP.NET app.
> The worst part is
> that they are intermittent - they just pop up every once in a while...
> generally more frequently when
> there are more simultaneous users of the site.  Without going into too
much
> detail of the code just
> yet, here is a stack trace with the errors:

> at

System.Data.SqlClient.SqlConnectionPoolManager.ReturnPooledConnection(SqlInt
> ernalConnection pooledConnection)
> at System.Data.SqlClient.SqlConnection.Open()
> at _30.fbDb..ctor() in C:\Documents and
> Settings\XXX\VSWebCache\YYY\30\classes\fbDb.vb:line 27
> at _30._default.BindData() in C:\Documents and
> Settings\XXX\VSWebCache\YYY\30\wtf\default.aspx.vb:line 45
> at _30._default.Page_Load(Object sender, EventArgs e) in C:\Documents and
> Settings\XXX\VSWebCache\YYY\30\wtf\default.aspx.vb:line 41
> at System.Web.UI.Control.OnLoad(EventArgs e)
> at System.Web.UI.Control.LoadRecursive()
> at System.Web.UI.Page.ProcessRequestMain()

> Essentially, the line in "fbDb.vb" is just the opening of an SQL connect
> (ie, connection.Open())
> Again, the problem is that it works 80% of the time... I can litterally
hit
> refresh... but then once or
> twice out of every 10 times I'll get that error (there doesnt' seem to be
> any real pattern to it).

> Has anyone else experienced anything like this?  Do I have to use/declare
my
> SQLConnection objects in some special way?

> Any help would be greatly appreciated - this has been plaguing me for
> months, and upgrading to the latest drivers and the like has not helped
> any...




 
 
 

1. Custom class error: "Object reference not set to an instance of an object."

Hi,

I've started writing a class to build some SQL to run but I'm having a
problem.
When I try and call the method that returns the SQL string, I get the
following error: "Object reference not set to an instance of an object."

    string strSQL;
    AdvSearchBuilder myQuery = new AdvSearchBuilder();
    myQuery.SelectColumns = "VenueName,Town";
    myQuery.VenueName = VenueName.Text;
    strSQL = myQuery.GetSQL();  // error is indicated on this line.

What does this mean? Which object is it referring to?

Thanks,

Nick...
(please reply to group)

2. Window's Scanning Software Bug under WINOS2

3. Crystal Reports-Error: Object reference not set to an instance of an object.

4. pine and pgp

5. Error Creating Control (Object reference not set to an instance of an object.)

6. Urgent: Font "Century Oldstyle 725 CNBT"

7. error: "Object reference not set to an instance of an object"

8. IPSec configuration

9. Object reference not set to an instance of an object error

10. error: Object reference not set to an instance of an object

11. error: object reference not set to an instance of an object

12. Object Reference Not Set to an Instance of an Object error when calling unmanaged DLL function

13. Object reference not set to the instance of an object