Solved

Error in application

Posted on 2009-03-31
18
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 4
  • +1
18 Comments
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 24035900
Sorry SQL synthax zone was an error..
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 24036722
What error?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 24037398
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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 24038725
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 70

Expert Comment

by:Éric Moreau
ID: 24038815
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
ID: 24038829
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
ID: 24038911
im having a NullReferenceException in my principal form named frmMenu.vb


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

Expert Comment

by:Éric Moreau
ID: 24038950
>>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
ID: 24039009
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
 
LVL 48

Expert Comment

by:jpaulino
ID: 24039056
>> 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
ID: 24039085
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
ID: 24039089
before having * sorry
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 24039103
>>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
ID: 24039983
>> 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
ID: 24045694
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
ID: 24047689
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 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 24047936
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
ID: 31565159
Thanks
0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
T-sql Date Format 9 67
Help with viewing image in ReportViewer 14 29
VB6 Enviroment 3 35
.NET Core supports which cell phone platforms? 3 37
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 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