Solved

Error in application

Posted on 2009-03-31
18
218 Views
Last Modified: 2013-11-26
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
0
Comment
Question by:PhilippeRenaud
  • 8
  • 5
  • 4
  • +1
18 Comments
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
Sorry SQL synthax zone was an error..
0
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
What error?
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
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
0
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
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.
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
There shouldn't be much differences but if we could know the error, maybe we could be able to explain it.
0
 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
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) ?
0
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
im having a NullReferenceException in my principal form named frmMenu.vb


release folder ?! let me find that..
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
>>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?
0
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
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.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
>> 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).
0
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
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..
0
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
before having * sorry
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
>>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!
0
 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
>> 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.
0
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
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

0
 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
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
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
maybe it is just a timing problem. have you tried to move that code into the Activate event when you are sure that the controls are fully loaded?

and again, 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?
0
 
LVL 1

Author Closing Comment

by:PhilippeRenaud
Comment Utility
Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now