NullReferenceException?

G

Guest

My application has been working fine for few months but I get this problem
which I couldn't solve recently. When I Build, I got "Files in the package
'netcf.all.wce4.armv4.cab' are more recent..." which other threads suggest I
should ignore the message. On Debug Window I get
" .....\bin\Debug\mscorlib.dll', No symbols loaded."
".......Debug\Client.exe', Symbols loaded."
"...Debug\System.Drawing.dll', No symbols loaded."
and lots more ....No symbols loaded.

I managed to log in, which is part of my application but with Exception
thrown.

"An unhandled exception of type 'System.NullReferenceException' occurred in
Client.exe.Additional information: NullReferenceException" appears at
following lines:-
-err = ex.Message & ": " & cmd.CommandText
-Me.Visible = True
-Application.Run(New LogIn)

Any solution to my problem?
 
P

Peter Foot [MVP]

It means that one of those items - probably cmd is not initialised and
therefore is null (Nothing in VB). So when you try to access the object to
retrieve the CommandText this exception is thrown...
Essentially it depends on whats happening before this code, step through
with the debugger and see what the state is before this line of code

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top