Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Unexplained Instance Error

Reply
Thread Tools

Unexplained Instance Error

 
 
Marty Cruise
Guest
Posts: n/a
 
      07-03-2003
I am getting the following error: " Object reference not
set to an instance of an object."

The strange thing is that I AM creating a new instance of
the object in the PageLoad event Iin the code behind)
just prior to using it's properties, and in fact, the app
ran perfectly until only recently when I installed
Project Server on the web server, which should have had
no impact.

Is there a security setting or something else that might
compromise instantiating classes? I'm lost.



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      07-03-2003
Without looking at your code, there is no way to tell.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Some things just happen.
Everything else occurs.

"Marty Cruise" <(E-Mail Removed)> wrote in message
news:03ce01c34195$f3a168c0$(E-Mail Removed)...
> I am getting the following error: " Object reference not
> set to an instance of an object."
>
> The strange thing is that I AM creating a new instance of
> the object in the PageLoad event Iin the code behind)
> just prior to using it's properties, and in fact, the app
> ran perfectly until only recently when I installed
> Project Server on the web server, which should have had
> no impact.
>
> Is there a security setting or something else that might
> compromise instantiating classes? I'm lost.
>
>
>



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      07-03-2003
I'm not sure why you're not getting an error on the following line:

> Public myOrder As New cOrder


It should read (assuming that the New constructor for cOrder takes no
arguments):

Public myOrder As New cOrder()

See if that doesn't fix it.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Some things just happen.
Everything else occurs.


"Marty Cruise" <(E-Mail Removed)> wrote in message
news:09ea01c3419d$eeef31b0$(E-Mail Removed)...
> Here is the relevant code. The error occurs when the
> myOrder.getInfo method is called:
>
> =============================
> Imports cLib
>
> Public Class frmPrintTR
> Inherits System.Web.UI.Page
> Public myOrder As New cOrder
> Protected WithEvents lblShipTo As
> System.Web.UI.WebControls.Label
> Protected WithEvents Button1 As
> System.Web.UI.WebControls.Button
> Protected WithEvents Button2 As
> System.Web.UI.WebControls.Button
> Protected WithEvents btnPrint As
> System.Web.UI.WebControls.Button
> Protected WithEvents btnClose As
> System.Web.UI.WebControls.Button
> Protected WithEvents pDesiredVendor As
> System.Web.UI.WebControls.Panel
> Protected WithEvents pComments As
> System.Web.UI.WebControls.Panel
> Protected WithEvents pCommentsNone As
> System.Web.UI.WebControls.Panel
> Protected WithEvents pItemsNone As
> System.Web.UI.WebControls.Panel
> Protected WithEvents repItems As
> System.Web.UI.WebControls.Repeater
>
> ' # Region stuff omitted from this posting
>
> Private Sub Page_Load(ByVal sender As Object, ByVal e
> As System.EventArgs) Handles MyBase.Load
> If Request.QueryString("TRID") = "" Then
> Exit Sub
> End If
>
> myOrder.GetInfo(CInt(Request.QueryString("TRID")))
> repComments.DataSource = myOrder.Comments
> repComments.DataBind()
>
> =============================
>
>
> >-----Original Message-----
> >Check your assumptions:
> >
> >if your control is actually there, does the
> >property/method you use reference yet another control

> that
> >is not there?
> >
> >Are there other objects referenced on the offending

> line?
> >and finally, have you used the debugger and stepped into
> >the routine causing the problem and checked the object
> >variables in question?
> >
> >>-----Original Message-----
> >>I am getting the following error: " Object reference

> not
> >>set to an instance of an object."
> >>
> >>The strange thing is that I AM creating a new instance

> of
> >>the object in the PageLoad event Iin the code behind)
> >>just prior to using it's properties, and in fact, the

> app
> >>ran perfectly until only recently when I installed
> >>Project Server on the web server, which should have had
> >>no impact.
> >>
> >>Is there a security setting or something else that

> might
> >>compromise instantiating classes? I'm lost.
> >>
> >>
> >>
> >>.
> >>

> >.
> >



 
Reply With Quote
 
Marty Cruise
Guest
Posts: n/a
 
      07-03-2003
Error still occurs...
 
Reply With Quote
 
David Waz..
Guest
Posts: n/a
 
      07-03-2003
try reading ALL posts to your answer and follow the
recommendations given...


>-----Original Message-----
>I am getting the following error: " Object reference not
>set to an instance of an object."
>
>The strange thing is that I AM creating a new instance of
>the object in the PageLoad event Iin the code behind)
>just prior to using it's properties, and in fact, the app
>ran perfectly until only recently when I installed
>Project Server on the web server, which should have had
>no impact.
>
>Is there a security setting or something else that might
>compromise instantiating classes? I'm lost.
>
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sudden unexplained IE validation error =?Utf-8?B?am9uZWZlcg==?= ASP .Net 0 02-05-2007 07:14 PM
Unexplained error when databinding Nathan Sokalski ASP .Net 6 08-26-2005 08:59 PM
Unexplained error when databinding Nathan Sokalski ASP .Net Web Controls 5 08-26-2005 12:01 PM
NEWBIE:unexplained syntax error Michiel Perl 2 09-10-2004 02:54 PM
unexplained bad performance of multipoint gre tunnel ... Garry Glendown Cisco 1 12-26-2003 10:23 AM



Advertisments