473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

how does one really delete a deleted record?

BeemerBiker
I can't get rid of a "deleted" record in a database. Even if I delete it the record shows back up the next time I do an update.

The following code generates an error message when using "driver=microsoft access driver (*.mdb)" Either in the app QTADO or in my own perl script that uses dbi:ODBC

really simple command: "UPDATE mytable SET Field1='rec';

error message: "The Microsoft Jet database engine stopped the process because you and another user are attempting to change the same data at the same time"

Ok there is no other user anywhere. When I tried the same query from Access 2007 I get a more informative error message and actuallly can see something that does not make sense;

Trying this



Gets this error message



If I click on yes, all the records are properly updated (unlike qtado or my perl script) however, there is a strange beast here:



I then went and "deleted" that record and tried the query again and sure enough the exact same thing happened, That "#Deleted" record had been put back in.

I poked around the access 2007 menues but cannot find any type of "repair" option. This database was created by 2003 and possibly is corrupted. I would think if I delete something it should go away.
Feb 21 '09 #1
6 3797
NeoPa
32,556 Expert Mod 16PB
Sounds pretty weird (from another Beemer biker ;) ).

I can only suggest doing a Compact / Repair of the database and trying again.

Alternatively, see what happens when you take Access 2007 out of the picture entirely, just to determine if it's related.
Feb 21 '09 #2
mshmyob
904 Expert 512MB
The 2007 Compact & repair is under that big round Office Button in the upper left. Then select Manage and you will see it.

cheers,
Feb 22 '09 #3
Solved - that manage - repair fixed it and the "deleted record" disappeared never to return (so far)

However, I tried doing
Expand|Select|Wrap|Line Numbers
  1. DBI:$dbh = DBI->connect('dbi:ODBC:driver=microsoft access driver (*.mdb);dbq=xxx
  2. then
  3. $dbh->compact()
  4.  
but: Can't locate object method "compact" via package "DBI::db"

I read where the compact method was available in the 4.0 jet engine but I do not know exactly what that is and if dbi:ODBC is using it.


so what is the diffrence between

Expand|Select|Wrap|Line Numbers
  1. use Win32::OLE::Const 'Microsoft DAO 3.6 Object Library';
  2. my $acc = Win32::OLE->new("DAO.DBEngine.36", 'quit');
  3.  
and
Expand|Select|Wrap|Line Numbers
  1. use DBI;
  2. DBI:$dbh = DBI->connect('dbi:ODBC:driver=microsoft access driver (*.mdb);dbq-blahblahblah;
  3.  
Do either of these use the so-called "jet 4.0 engine"? If I did not have access I would have to call the compact method (or so I have been told)

thanks!
Feb 25 '09 #4
NeoPa
32,556 Expert Mod 16PB
I wish I could help. I think I'll have to leave you in Mshmyob's capables.
Feb 25 '09 #5
mshmyob
904 Expert 512MB
I don't know ASP very well but I found this article on how to compact and repair an Access database using ASP.

The key is that you need to make a copy first and then compact and repair then copy back.

I also have never used any of the QTADO tools - sorry.

ASP method to compact repair access database

hope this helps

cheers,
Feb 25 '09 #6
NeoPa
32,556 Expert Mod 16PB
Sorry, didn't realise that was ASP (This is the Access forum).

If it would help, I can get this moved to one of the ASP.NET or ASP (classic) forums for you.
Feb 25 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Maria | last post by:
Is there another way to delete the current record in a subform from the main form, another subform or a sub-subform other than setting focus on a field in the subform and using run command...
3
by: John Rivers | last post by:
Hello, I think this will apply to alot of web applications: users want the ability to delete a record in table x this record is related to records in other tables and those to others in...
5
by: Bob Bridges | last post by:
Start with two tables, parent records in one and child records in the other, a one-to-many relationship. Create a select statement joining the two. Display the query in datasheet mode. When I...
1
by: Swinky | last post by:
I have added code to delete a record (and records in related tables) in the OnClick property: MsgBox "Confirm delete. Once you confirm, record will no longer exist.", vbOKCancel strSQL =...
4
by: Swinky | last post by:
I have added code to delete a record (and records in related tables) in the OnClick property: MsgBox "Confirm delete. Once you confirm, record will no longer exist.", vbOKCancel strSQL =...
2
by: =?Utf-8?B?QmV0bw==?= | last post by:
I am developing a ASP.NET application, with C# code-behind classes; with SQL Server 2000. All database access is made through stored procedures. I can insert, select and update in all tables...
3
by: Phil Stanton | last post by:
I have a form based on a complex query (Lots of tables) If I delete a record, everything appears to be OK. Get the message "Youa are about to delete 1 record ....". I say yes. The record count...
10
beacon
by: beacon | last post by:
Hi everybody, This is probably going to sound unorthodox, but I have to log records that are deleted...I know, go figure. Anyway, I have a form with a (continuous) subform, and on the subform I...
31
by: matthewslyman | last post by:
I have an unusual design and some very unusual issues with my code... I have forced Access to cooperate on everything except one issue - record deletion. My form design involves a recursively...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.