473,785 Members | 2,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unexplained Instance Error

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.

Nov 17 '05 #1
4 1491
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" <mC*****@noSpam .com> wrote in message
news:03******** *************** *****@phx.gbl.. .
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.

Nov 17 '05 #2
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" <mC*****@noSPam .com> wrote in message
news:09******** *************** *****@phx.gbl.. . Here is the relevant code. The error occurs when the
myOrder.getInfo method is called:

=============== ==============
Imports cLib

Public Class frmPrintTR
Inherits System.Web.UI.P age
Public myOrder As New cOrder
Protected WithEvents lblShipTo As
System.Web.UI.W ebControls.Labe l
Protected WithEvents Button1 As
System.Web.UI.W ebControls.Butt on
Protected WithEvents Button2 As
System.Web.UI.W ebControls.Butt on
Protected WithEvents btnPrint As
System.Web.UI.W ebControls.Butt on
Protected WithEvents btnClose As
System.Web.UI.W ebControls.Butt on
Protected WithEvents pDesiredVendor As
System.Web.UI.W ebControls.Pane l
Protected WithEvents pComments As
System.Web.UI.W ebControls.Pane l
Protected WithEvents pCommentsNone As
System.Web.UI.W ebControls.Pane l
Protected WithEvents pItemsNone As
System.Web.UI.W ebControls.Pane l
Protected WithEvents repItems As
System.Web.UI.W ebControls.Repe ater

' # Region stuff omitted from this posting

Private Sub Page_Load(ByVal sender As Object, ByVal e
As System.EventArg s) Handles MyBase.Load
If Request.QuerySt ring("TRID") = "" Then
Exit Sub
End If

myOrder.GetInfo (CInt(Request.Q ueryString("TRI D")))
repComments.Dat aSource = myOrder.Comment s
repComments.Dat aBind()

=============== ==============

-----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 notset to an instance of an object."

The strange thing is that I AM creating a new instance ofthe object in the PageLoad event Iin the code behind)
just prior to using it's properties, and in fact, the appran 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 mightcompromise instantiating classes? I'm lost.

.

.

Nov 17 '05 #3
Error still occurs...
Nov 17 '05 #4
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.

.

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2410
by: Peter Kleiweg | last post by:
I have a program with these fragments: from Tkinter import * import tkFileDialog import tkMessageBox def openProject(): filepath = tkFileDialog.askopenfilename(filetypes=(("project files","*.ini"), ("all","*")))
2
1172
by: puzzlecracker | last post by:
Fixed font - Proportional font string initilization WHY? All 2 messages in topic - view as tree puzzlecracker Jan 29, 10:47 pm show options Newsgroups: comp.lang.c From: "puzzlecracker" <ironsel2...@gmail.com> - Find messages by this author
2
5565
by: Mike | last post by:
Greetings, Having a major problem here. running version 8.2 on win2003 server. The problem I am having is backing up a database seems to get to the last part of the backup and then fails. This brings the whole instance down and it has to be restarted. In addition the job seems to be stuck in the TOOLSDB as if I try to delete the backup job I get "The task is currently running". So I went to the command line and tried "db2 backup database...
6
2314
by: Nathan Sokalski | last post by:
I am using a DataSet as the DataSource of a DataList in my code. The SQL used to get the data from the database begins with: SELECT members.organization,artists.artist,artists.email,artists.website,members.email FROM members INNER JOIN artists ON members.memberid=artists.memberid WHERE Notice that both tables involved in the SELECT statement have a field named
0
992
by: =?Utf-8?B?am9uZWZlcg==?= | last post by:
I have a simple Login page that suddenly is producing this error. What is perplexing is that I didn't touch this page or anything (that I can think of that is related) All I did was make another aspx page (MemberResults.aspx) into a content page for my master page. As soon as I added the content opening and closing tag to MemberResults... up popped this error in my Login page (which is in no way - yet - related)
1
6490
by: vijay.db | last post by:
Hi Team, Very serious problem with my DB2 V8.1 Fixpack 6 running in AIX 5.1 machine. Every one hour my DB2 instance processes are killed and it's going down. Several trap files are generated in the db2 diag log directory. Following the detailed entry in the db2diag.log: 2007-02-28-05.00.10.650672 Instance:****** Node:000 PID:2109578(db2agent (dbname) 0) TID:1 Appid:GA6DA619.C438.002D98045717
18
2011
NeoPa
by: NeoPa | last post by:
I have form which handles Shift-Esc by calling a close of the form (See line #6 below). Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If (Shift And acShiftMask) <> acShiftMask Then Exit Sub On Error Resume Next Select Case KeyCode Case vbKeyEscape Call DoCmd.Close Case vbKeyUp Call DoCmd.GoToRecord(Record:=acPrevious) Case vbKeyDown
2
2128
by: Peted | last post by:
Hi, im moving a project from vs2005 to vs 2008. is doing so i have come across a compiler error regarding partial classes that i dont understand if anyone can explain it to me please the orig defintion that compiles and runs fine in vs2005 is bellow......
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10087
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.