Re: Annoy "Object reference not set to an instance of an object." Help.

jeff_at_removeemergencyreporting.com
Date: 11/20/04


Date: Sat, 20 Nov 2004 10:02:20 -0800

Deep breath. Let it go...

"Scott M." <s-mar@nospam.nospam> wrote in message
news:O6rT3lozEHA.3452@TK2MSFTNGP14.phx.gbl...
> > Wow, evidently I pushed a few buttons did I? I suspect you've spent at
> > least 10 minutes of your time wasted on me, and not with the OP.
>
> I helped the OP with 2 minutes of my time.
>
> >
> > Believe me, I'm not worth it
>
> You are right there.
>
> >
> > Yes, I tend to vent, then get on with business. I've read everything you
> > said, and I agree.
>
> >Different styles.
>
> If you call impatient bullying a style, ok.
>
> > Not a problem.
>
> Not for you evidently.
>
> >
> > :-)
> >
> > Jeff
> >
> > "Scott M." <s-mar@nospam.nospam> wrote in message
> > news:u65uQCozEHA.2788@TK2MSFTNGP15.phx.gbl...
> >> >I recommended in my first post to simplify the code. Get simpler code
> >> > working. Judicious use of commenting out code, and/or copy-n-paste,
or
> >> > real
> >> > time debugging. Useful skills that work for me always.
> >>
> >> That's fine for you, but if someone isn't sure of what the code is that
> > they
> >> are commenting out, then it's nothing more that a spin of the roulette
> >> wheel. It's not very educationally sound advice.
> >>
> >> >
> >> > Create a connection in separate code, and get that working. Then add
> >> > the
> >> > existing code till it breaks, and pinpoint the problem. 20 minutes,
> > tops.
> >> >
> >> > He didn't follow my advice.
> >>
> >> Maybe he didn't know how to get a working connection? Maybe that is
the
> >> problem? Again, not very educational.
> >>
> >> >
> >> > He didn't learn anything from you, other than "when a problem arises,
> > give
> >> > up, and post to the newsgroups"
> >>
> >> Really? Have you no understanding of how to read:
> >>
> >> "If you aren't using a password, then you should remove the Password=
> >> part
> >> of
> >> the connection string.
> >> If you do need a password, then you have forgotten to add it here
> >> If your INSERT command is incorrect, you will get an error as well
> >> You should ALWAYS put your connection.Open inside of a try...end try
> >> Why are you renaming the exception that is caught in the Catch to err?
> > This
> >> is a reserved word that represents the VB 6.0 error object. It is a
good
> >> idea to leave the name at ex.
> >> Why not use the Catch for the purpose it was intented? Right now, you
> >> are
> >> taking any exceptions you get and just throwing them again. I know
that
> > for
> >> production purposes that may be what you want to do, but in
development,
> > you
> >> can use the catch to find out what is going wrong."
> >>
> >> These are all solid points that have an explanation attached to them.
> >> Please Jeff, now you are just slinging mud so you won't have to admit
> >> that
> >> you weren't really helping at all.
> >>
> >> >
> >> > He'll be back. Yes, I take concern on that. Others don't. Not a
> >> > problem.
> >> > Just my thing.
> >>
> >> Listen to yourself. Are you on some sort of crusade? You really don't
> > have
> >> any understanding of how learning takes place do you?
> >>
> >> You made 9 posts and in not one of them did you discuss the actual
> >> problem
> >> or possible problems. You repeatedly told the OP to do things he
> > obviously
> >> didn't know how to do and were not very nice about it in the process.
> >> You
> >> want someone to blame for the OP having to come back 8 extra times? Go
> > look
> >> in the mirror.
> >>
> >> Yes, he may be back, but probably with a different problem. And, when
> > that
> >> happens, helpful people like me and most others here will supply the
> >> information that the OP's need. That's kinda how this whole NG thing
> > works.
> >> If you don't like that, then you really are in for some disappointment
> >> and
> >> stress.
> >>
> >> >
> >> > And I'm a professional trainer too, 10 years at Microsoft, 2 years
> >> > teaching
> >> > MCP classes at a large university in Seattle, and authored a book on
> > IIS.
> >> >
> >>
> >> No wonder I've never heard of you though, you aren't a very good one.
> >> You've clearly shown here that you don't have any understanding of how
> >> the
> >> learning process works. You've shown that, while you may have good
> >> technical skills, you don't posses the necessary patience and
imagination
> > to
> >> teach adults new concepts. It's one thing to know something, it's very
> >> different to teach it.
> >>
> >> I'm not an MCT, and for a good reason....The MCT program is very
> > restrictive
> >> about the courseware that must be used and the labs that must be
taught.
> >> I've repeatedly found that to teach adults effectively, you can't work
> > with
> >> just one canned solution. You need flexibility and the ability to
change
> >> your approach based on the situation. The MCT program doesn't allow
for
> >> that.
> >>
> >> > So you don't encourage your students to learn for themselves? Or
learn
> >> > proper troubleshooting techniques?
> >> >
> >> > I don't want to argue, I agree that your approach is simply different
> > than
> >> > mine.
> >>
> >> Jeff, you are VERY GOOD at arguing -- you should do it as a profession.
> > It
> >> is very clear that I gave the OP many suggestions for where to being
> > looking
> >> for problems. In fact, after my one post (as opposed to your 9), the
OP
> >> said:
> >>
> >> "I guess Scott M is right, sounds like the connection cause the
problem.
> >> Testing..."
> >>
> >> which tells me that I gave the OP some information to go back and work
> > with.
> >> Randomly, commenting out lines of code (which is what you'll be doing
if
> > you
> >> don't understand the lines in the first place) is NOT, nor has it EVER
> > been
> >> a PROPER troublshooting technique. It is a crap shoot. Understanding
> >> the
> >> premis behind the code you work with, understanding how to read a
> > StackTrace
> >> (provided by the OP), understanding how the debug process works,
> >> understanding how structured exception handling can not only handle
> >> exceptions but be used as a debugging tool and understanding what
"Object
> >> reference not set to an instance of an object." means are all PROPER
> >> troublshooting techniques. It's a good think you didn't write a book
on
> >> diagnosing execptions.
> >>
> >> >
> >> > Both work.
> >> >
> >> > The reason I give my real email is so we can take inappropriate
> >> > discussions
> >> > like this offline. I would have sent you this in email, but I don't
> >> > have
> >> > your address. This post of mine offers nothing to the OP or to the
> > group.
> >>
> >> Neither have any of your posts. If you kept your posts relevant in the
> >> first place, you wouldn't need to argue with people off line. I'm
happy
> > to
> >> have this discussion publicly... Because, I believe I am still teaching
> >> others the PROPER way to test code with my remarks to you and while you
> > may
> >> not be able to absorb what I'm saying, I'm sure others will.
> >>
> >> >
> >> > Jeff
> >> >
> >> >
> >> >
> >> > "Scott M." <s-mar@nospam.nospam> wrote in message
> >> > news:e4cw6XnzEHA.3396@TK2MSFTNGP09.phx.gbl...
> >> >> > Sorry, was I talking to you? My hope that people can learn to
solve
> >> > their
> >> >> > problems themselves.
> >> >>
> >> >> Then there really is no reason for you to post anything in the first
> >> > place.
> >> >> Badgering the OP, when he clearly didn't understand you isn't going
to
> >> > help
> >> >> anyone.
> >> >>
> >> >> >
> >> >> > And feeling? My suggestion would have pinpointed the problem
> > straight
> >> >> > away.
> >> >> >
> >> >>
> >> >> If you consider "straight away" 9 messages from you without getting
> >> > anywhere
> >> >> close to the problem vs. one from me, then yes, you are correct.
> >> >>
> >> >> > Granted, I see 2 schools of thought on newsgroups. One, blindly
> > answer
> >> >> > posted questions. The other, educate.
> >> >>
> >> >> Too bad you did neither. If you read what I wrote, you'd see that I
> >> >> explained what is most likely the problem and several possibilities
as
> > to
> >> >> why it might be happening. I left it to the OP to go check them
out.
> > I
> >> >> happen to be a professional trainer, so I know a thing or 2 about
how
> > to
> >> >> educate myself. What you did was not helpful to anyone. You were
> >> >> clearly
> >> >> adversarial and offered nothing that would help the OP to find the
> >> >> problem
> >> >> much less understand it, so let's just climb down of your soap box
for
> > a
> >> >> moment and be honest here.
> >> >>
> >> >> > Mine is to educate. "Give a man a fish, and he'll be hungry by the
> > end
> >> > of
> >> >> > the day. Teach them to fish, and they will never be hungry again."
> >> >>
> >> >> Get real, Jeff. It's quite a stretch to call your continued
badgering
> > of
> >> >> the OP education in any way.
> >> >>
> >> >> >
> >> >> > Both work. I agree with both. But I choose one style.
> >> >>
> >> >> Then perhaps you could do some learning on how to use that style
> > because
> >> > you
> >> >> certainly haven't done so here.
> >> >>
> >> >> >
> >> >> > Simpler code is always easier to debug and diagnose.
> >> >>
> >> >> You told the OP to give us simple code that works. The OP couldn't
> >> >> get
> >> > the
> >> >> code to work! That was the problem. Perhaps the OP doesn't know
what
> >> >> simpler code there is? Perhaps, that's why we need to help people
> > around
> >> >> here? No one said you had to write the correct code for the OP, but
> > you
> >> >> could have been a little kinder and certainly could have been more
> >> > helpful.
> >> >> >
> >> >> > And I give my email in posts, and invite private discourse. Do
you?
> >> >>
> >> >> Why would I need to. Why not let everyone benefit from the problem
> >> >> and
> >> > the
> >> >> solution? If you are truly helping someone, then they shouldn't
need
> > to
> >> >> contact you privately to solve their problem.
> >> >>
> >> >> > Granted, I put up with major spam.
> >> >>
> >> >> And, perhaps the rest of us know that we can avoid spam and help the
> > OP's
> >> > at
> >> >> the same time?
> >> >>
> >> >> >
> >> >> > Jeff
> >> >> >
> >> >> >
> >> >> > "Scott M." <s-mar@nospam.nospam> wrote in message
> >> >> > news:e0oSEYmzEHA.3236@TK2MSFTNGP15.phx.gbl...
> >> >> >> Interesting Jeff, since I was able to look at the OP and get a
> > feeling
> >> >> >> for
> >> >> >> where the problem was right away.
> >> >> >>
> >> >> >> "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in
message
> >> >> >> news:u3kCnrlzEHA.1192@tk2msftngp13.phx.gbl...
> >> >> >> > Wow. If you used simpler code, as I suggested, you would have
> > found
> >> >> >> > the
> >> >> >> > problem hours if not days ago
> >> >> >> >
> >> >> >> > Jeff
> >> >> >> > "nick" <nbdy9.removethis@hotmail.com> wrote in message
> >> >> >> > news:OBeRJ$azEHA.1392@TK2MSFTNGP14.phx.gbl...
> >> >> >> >> I didn't add code. The same code (dll file, when called by
> > asp.net
> >> > it
> >> >> > has
> >> >> >> >> the problem). I guess Scott M is right, sounds like the
> > connection
> >> >> > cause
> >> >> >> > the
> >> >> >> >> problem. Testing...
> >> >> >> >>
> >> >> >> >> "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in
> > message
> >> >> >> >> news:%2346KxzazEHA.2600@TK2MSFTNGP09.phx.gbl...
> >> >> >> >> > Did you simplify the code?? Sounds like you are adding
> > code...to
> >> >> > code
> >> >> >> >> > that
> >> >> >> >> > already not working. Hmmm...
> >> >> >> >> >
> >> >> >> >> > Troubleshooting 101
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "nick" <nbdy9.removethis@hotmail.com> wrote in message
> >> >> >> >> > news:uWuoFwazEHA.3548@TK2MSFTNGP09.phx.gbl...
> >> >> >> >> >> btw, the problem occur when run in ASP.Net application.
When
> > run
> >> > as
> >> >> >> >> >> non-asp.net application (testing using NUnit), there is no
> >> > problem.
> >> >> >> >> >>
> >> >> >> >> >> I already did the impersonate:
> >> >> >> >> >>
> >> >> >> >> >> web.config:
> >> >> >> >> >> <configuration>
> >> >> >> >> >> <system.web>
> >> >> >> >> >> <identity impersonate="true" userName="yw" password="...."
/>
> >> >> >> >> >>
> >> >> >> >> >> Also, I set the Intranet security to high (may not be
useful
> > in
> >> >> > this
> >> >> >> >> > case).
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>