 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 29th, 2003, 08:17 AM
|
|
Registered User
|
|
Join Date: Aug 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
#Deleted
For some reason, my database has a row of all #Deleted. I have no idea how this got here. However, when I go into MS Access to delete the row, I highlight it and press the "delete" key. It asks if I want to delete it. I say yes. Then I close the database and re-open it. The line is still there and my asp page cannot read any records beyond where the row of #Deleted is. Anyone know how to delete this row without it coming back and how it got there in the first place?
I am also getting the following error at the very top of my page. (the #deleted row is near the bottom):
[Microsoft][ODBC Microsoft Access Driver] Record is deleted.
|
|

August 29th, 2003, 08:49 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
Hi Jeff,
Sounds a little odd. Try compacting Access, if you haven't already, which reclaims unused space created by object and record deletions. When records are deleted from the database, the space they occupied is marked as available for new additions. Compacting might reclaim the space in question. 'Bout all I can think of.
HTH,
Bob
|
|

August 29th, 2003, 09:03 AM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
If repairing & compacting doesn't work, you have a corrupted record in the dataset. It will not let you delete it, so what you need to do is do a sort and get the pk (hopefully you have a autonumber pk on the table), and make a new table using the criteria of < the offending record. Then append everything > the offending record. Rename the original table to _Bad and rename your new one to what the original one was.
HTH,
Beth M
|
|

August 29th, 2003, 09:34 AM
|
|
Registered User
|
|
Join Date: Aug 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I tried to repair but that screwed up the ordering of the database and but everything out of order, so I had to undo that. I would also like to know how this happened? I do have an autonumber pk, but the ID number of the recordset is #Deleted
|
|

August 29th, 2003, 09:42 AM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It would be #Deleted (the pk that is) since the whole row is corrupted. But if you sort your table by pk, then you can see what is above and below the corrupted record and append those records to a new table.
How the record was corrupted? Who knows. Possibly due to a network dropout while adding or editing a record. If you aren't on a network and it's a standalone, maybe the system crashed.. I'm not an expert, I have just found ways to correct something when it goes wrong...
Beth M
|
|

August 29th, 2003, 01:20 PM
|
|
Registered User
|
|
Join Date: Aug 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank everyone for the help! I just rebuilt the database and everything seems to be working now. Hopefully this wont happen again. I am going to do some research to see if I can find out why this happens.. I will post my results here!
Thanks everyone!!!
|
|

August 29th, 2003, 01:27 PM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm glad you are back up and running and I'll be watching for a post to see if you find out *why* it happens!
Regards,
Beth M
|
|
 |