Solved

Visual basic debug vs release

Posted on 2004-09-02
12
224 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

911 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

19 Experts available now in Live!

Get 1:1 Help Now