Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-05-2018, 09:21 AM
Badger Badger is offline
Member
 
Join Date: Aug 2013
Location: Sheffield, Tasmania (Aust)
Posts: 76
Default Access Error - can someone explain?

I have a large membership program which starts with an opening page that has a button that simply says 'Enter database' which adds the club logo and makes a page control visible.
When I ran the program I could leave the opening page as long as I wanted and everything was fine. If I pressed the 'Enter Database' button I could use the program perfectly. However, if the program was then run for an hour or two, I got a C0000005 access error.
I finally realised could stop this happening if I cut the line that loaded the picture into the logo so I thought this was the problem. I did a lot of investigation with this in mind but couldn't run down the problem.
Finally I decided to ask this forum and, to clean up the code snippet responsible, I deleted a couple of lines such as 'dummy:=Optionsform.Heading.Text;' which were in to help with debugging the program. I then recompiled the program.
Now I can't make the program fault. Can anyone explain what happened?
Reply With Quote
  #2  
Old 09-05-2018, 09:17 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 313
Default

Which version of Delphi and what database access components are you using ?
Reply With Quote
  #3  
Old 09-05-2018, 09:51 PM
Badger Badger is offline
Member
 
Join Date: Aug 2013
Location: Sheffield, Tasmania (Aust)
Posts: 76
Default

I'm using XE5.
Although it's a sort of database, I'm not using database components just standard components.
Reply With Quote
  #4  
Old 09-06-2018, 09:33 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 313
Default

I'm not sure what 'sort of database' means.

Anyway a search on your error brings up
Quote:
Exception code c0000005 is the code for an access violation. That means that your program is accessing (either reading or writing) a memory address to which it does not have rights. Most commonly this is caused by: Accessing a stale pointer.
See herehttps://www.youtube.com/watch?v=RMLss_oLtvQ

May have been a one off.
Reply With Quote
  #5  
Old 09-06-2018, 11:32 PM
rojam rojam is offline
Senior Member
 
Join Date: Jun 2015
Posts: 190
Default

You need to include the original code for us to try to figure it out. The revised code could help also.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 01:49 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.