Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Debugger behavior

Status
Not open for further replies.

vbajock

Programmer
Jun 8, 2001
1,921
US
I have one particular Access program, that if you force a break by hitting Ctl/Break, and then hit the F8 key to go to next line of code, instead jumps back to the first line of the function. Does anyone have any idea what causes this?
 
I fixed it by removing a Doevents statement in the DO loop that was stopped by the break, but I am still wondering why it would happen??
 
When things start going funky on me, I always use the decompile option.

You can surf for something like Access Decompile and get lots of info on it.

In short, make a shortcut to your access database with something like

c:\yadda\yadda...\Access.exe YourDbName.mdb /decompile

and it strips out the compiled code. Since it appears VB is incrementally linked, bad stuff can accumulate. This gets rid of it.
 
What do you mean by "incrementally linked"?

 
Perhaps incremental compiling is better. The idea is; when you make changes to your code, the entire project isn't recompiled (changed to executable form) and re-linked (making sure things like global variables and function calls point to the correct location in the executable code); only affected areas are re-linked. This is very complicated, and occasionally can cause problems; decompile may help.
 
Ok. This code is running in a big plant and it gets changed and recompiled constantly. Are you saying that if the code is being constantly recompiled it should occasionally be decompiled ? I have had an occasional mdb that had problems that were fixed by creating a new mdb and importing all the objects from the corrupt MDB, and this fixed the problem. I am wondering if doing this essentially accomplishes the same thing as decompiling.

BTW- We always recompile after changes due to a Microsoft bug where when you went to open a code module you would get some type of nebulous network error and the code modules in the mdb were lost. Microsoft told us this was due to not recompiling the MDB's after changes.
 
I too have had problems that require importing all objects to a new database, which is a complete pain in the body part of your choice when you have a secure database.

However, the necessity for that has completely gone away since I discovered, and used, the decompile option.

So, I'd definitely recommend it. However, I'm using Access 97, perhaps other versions are more stable. It has been my experience, however, that stability may actually decrease on a new version (see Windows ME)

 
Mr. BeeTee - I appreciate all your help on this. Thenext time this happens I will try the decompile, and perhaps bother you with more questions. Until then - thanks!
 
vbaJock,

If you want people to answer questions about your code, post the code. I don't personally think that / decompile has anything to do with this issue.

Jeremy =============
Jeremy Wallace
AlphaBet City Dataworks

Take a look at the Developers' section of the site for some helpful fundamentals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top