?
Solved

Visual basic debug vs release

Posted on 2004-09-02
12
Medium Priority
?
229 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
[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
  • 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

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 375 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Suggested Courses

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