Solved

Visual basic debug vs release

Posted on 2004-09-02
12
226 Views
Last Modified: 2013-11-25
My program gets different results in debug and release mode
when i debug and run an application the results are correct but after creating an exe of the application the results are wrong  
0
Comment
Question by:shwetaabhishek
  • 5
  • 2
  • 2
  • +2
12 Comments
 
LVL 7

Expert Comment

by:_agj_
ID: 11963294
possibly some timing issues which requires a couple of DoEvents?

as in, possibly some part of the execution requires to wait for some time...
0
 
LVL 8

Expert Comment

by:mladenovicz
ID: 11963321
Can you post code that gives different results?
0
 

Author Comment

by:shwetaabhishek
ID: 11963331
no i cannot post the code is is confidential
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:shwetaabhishek
ID: 11963352
i will explain the scenario :
1, i have winsock application , using senddata and recvdata i am getting and sending few values .. when i am doing it in debug mode the result is correct , but when i am making the exe of application then the senddata  is getting correct value but the recvdata is not
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 11963406
You will have to write a log file to see where the errors arise. You can use App.Logevent..
0
 

Author Comment

by:shwetaabhishek
ID: 11963435
The error is traced " runtime error : subscript out of range "
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 11963453
I posted before your last comment, shwetaabhishek. My comment was not directed at your particular scenario.
0
 
LVL 8

Expert Comment

by:mladenovicz
ID: 11963476
when you working with arrays try sthg like this

For i= LBound(myArray) To  UBound(myArray)
.....
Next

You can log this values to file to check what's wrong (LBound(myArray) and  UBound(myArray))
0
 

Author Comment

by:shwetaabhishek
ID: 11963508
i am not working with array
sendata and recvdata are strings and getting differnt values in debug and after creating exe of application ?cant i create an exe in debug mode itself so that the things are preserved
0
 
LVL 5

Accepted Solution

by:
brianb99999 earned 125 total points
ID: 11969013
cant i create an exe in debug mode itself so that the things are preserved
No.

runtime error : subscript out of range
What line of code does this occur on?

Most of the time these sorts of errors are timing errors.
Track down the line the error occurs on (using the log idea suggested above) and try adding a doevents just before the line of code that the error occurs on.

Brian.
0
 

Author Comment

by:shwetaabhishek
ID: 12601167
please close this question
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 236
Passing a Text Box name to a Sub 6 102
SSRS troubles 4 82
Where did System.Data.Objects go? 2 57
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 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