Link to home
Start Free TrialLog in
Avatar of Philippe Renaud
Philippe RenaudFlag for Canada

asked on

Error in application

Hello EE,

I did an application VB.NET with VS 2008. the app is running perfectly when I run my SQL and VS as administrator. Also, running perfeclty when I press the run button.

Now, when I try to execute via the EXE file inside the folder DEBUG, im having an error somewhere in the app that does not show up when I press the run button inside VS2008...

Also that EXE i did run as Administrator so I dont understand, whats the damn difference??

I want it to work because I need to show the app to a client and I dont want to panic him by entering VS2008, then he sees the code then I press run...you know he wont pay lol
Avatar of Philippe Renaud
Philippe Renaud
Flag of Canada image

ASKER

Sorry SQL synthax zone was an error..
Avatar of Carl Tawn
What error?
You will need to find out where the problem is. How do you want us with so little info and no code to be able to tell you what's wrong?

You should add tracing to your application. Have a look at http://www.emoreau.com/Entries/Articles/2003/11/Code-diagnostic-an-article-on-tracing-and-debugging.aspx
I want to understand WHY a program could run perfectly when inside VS2008 and if compiled and double clicking on the exe icon would give an error

I dont understand the difference. Thats my post.

whats the difference between pressing "run, the little green arrow" and double clickin the executable.
There shouldn't be much differences but if we could know the error, maybe we could be able to explain it.
You should use RELEASE folder and not DEBUG. Check in here more details about the difference between the both folder http://www.dotnetspider.com/forum/173537-different-Between-Debug-Release.aspx
What error do you have (if you have one) ?
im having a NullReferenceException in my principal form named frmMenu.vb


release folder ?! let me find that..
>>You should use RELEASE folder and not DEBUG.

This is true only if you had already compiled to RELEASE mode.

>>m having a NullReferenceException in my principal form named frmMenu.vb

Are you trying to run your application on the same or from another one? If it is another one, you are probably missing a component. If you are running from the same PC, an object was not set. Can you tell which object it is?
Yes on the same PC.

I just saw somethign tho, in the folders of the project, there are 3 folders: bin, MyProject, obj

inside bin there is a debug folder.
inside obj a debug folder too.  Both after are having a .EXE of the app.   is it the same? I did not try both. actually I wont be able to try until tonight...im not at home.
>> This is true only if you had already compiled to RELEASE mode.
Right emoreau ... thanks for the note.
Do you have DB connection ? You can run SQL Express in DEBUG mode but not from the exe file (the include in the VS).
yes I have a DB connection. Actually I know this is working because, because having my NullReferenceException i am able to navigate the app with info thay are coming from the DB.

Actually, I will post the ENTIRE error tonight. sorry If I did not earlier.
I cant post it right now im not in front of it..
before having * sorry
>>You can run SQL Express in DEBUG mode but not from the exe file (the include in the VS)

Where do you get this information from? I can prove you wrong many times!
>> Where do you get this information from? I can prove you wrong many times!
LOL, I have tested and you're right! I work with several workstations and I never use the EXPRESS server.
hello again,
thats my error.

and line 13 is :

        If getPanel("panelInner0").VerticalScroll.Visible = True Then


so like I said, everything is working great inside VS2008.... but not when I execute the EXE.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at xx.frmCart.frmCart_Load(Object sender, EventArgs e) in C:\Users\Admin\Documents\Visual Studio 2008\Projects\xx\xx\frmCart.vb:line 13
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Open in new window

Humm, and what getPanel() does ? Can you show more code and explain us more ?
But I think you're not using that inside an Try ... Catch ... End Try block, right ? If you have the application didn't crash
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks