Thread View: borland.public.delphi.database
2 messages
2 total messages
Started by John Randall
Fri, 17 Oct 2008 08:16
Corrupt Delphi 7 DataModule
Author: John Randall
Date: Fri, 17 Oct 2008 08:16
Date: Fri, 17 Oct 2008 08:16
52 lines
4291 bytes
4291 bytes
I write the software for the company I work for using Delphi addressing a MySQL database. My project therefore has a DataModule in a file named DataUnit.pas. This is a large project and the DataUnit.pas file is large. It represents many hours of work! It's been a while since I've needed to do anything to the DataModule but the other day I needed to look at something, when I discovered to my horror that the unit appears to be corrupt. When a project is compiled, small blue dots are placed in the left margin, to indicate lines on which a a breakpoint may be set. In the case of my DataModule, there are no blue dots until, in the middle of a procedure, the blue dots appear from line 4145 to the last line, line 5637. When present, the blue dots appear to make sense (for example, there is no blue dot next to a line starting with the word "procedure", but there is one on that procedures "begin" statement. However, if I set a breakpoint on a line in this region, it is not honoured; its as though no breakpoint is set. Suspecting that the blue dots might be offset, I set a breakpoint on the first blue dot (line 4145) and then set a breakpoint in another unit of the code at a point where the first routine in the data module is called. Sure enough, when I singlestep (F7) onto the line calling the first routine in the data module, control jumps to the data module, to line 4145, the line in the middle of a procedure. When next I press F7, an access-violation error message is generated. Makes sense - I can't expect to start in the middle of a procedure! When I run without breakpoints, the code does its job correctly, so the code is (I hope!) fine, the problem is in the breakpoint mechanism. I've asked my question in a forum with limited relevance and the consensus was that I was somehow linking to an out-of-date DataUnit.dcu file, hence the inappropriate positions for the blue dots. (I recently bought and installed EurekaLog - to track a memory leak - and wanted to eliminate the possibility that this was the cause of the problem. No-one in the EurekaLog forum thought EurekaLog was the culprit.) In short, please don't suggest that I delete all dcu's for my project, then build it (rather than compile it). I've tested this suggestion and a number of similar ones, all based on the assumption that my DataUnit.dcu file is not the one I think it is. As another example of suggestions tested, I removed the DatUnit.pas file from my project then added to the project, making sure I was selecting the correct DataUnit.pas file. All the units I've made for this project are in a single folder, the folder containing the dpr file. Does anybody know what's wrong here, and how to fix the problem? The idea that I will not be able to singlestep into my data module when needed horrifies me! Many thanks in advance for your assistance. John Randall. PS: I posted this query in the borland.public.delphi newsgroup, but that group appears to be inactive.
Re: Corrupt Delphi 7 DataModule
Author: scoots987
Date: Mon, 20 Oct 2008 19:41
Date: Mon, 20 Oct 2008 19:41
2 lines
1356 bytes
1356 bytes
Sorry, did you say what version of Delphi? This sounds like an old version of Delphi. Any hotfixes available for this version?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads