473,667 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Delete queries fail unexplainably

MLH
Take the following SQL:
DELETE tblPreliminaryV INs.*
FROM tblPreliminaryV INs INNER JOIN tblVehicleJobs ON
tblPreliminaryV INs.PVIN = tblVehicleJobs. SerialNum;

Access 97 consistently disallows me to run queries of this
nature. I'm the database owner and the owner of all its
objects and have full admin rights to them all.

I have absolutely zero problems running
DELETE tblPreliminaryV INs.*
FROM tblPreliminaryV INs;
which deletes ALL the records from the table.

But if I try selectively deleting records in tblPreliminaryV INs that
have related records in tblVehicleJobs, A97 gives me a bunch
of - well, to put it truthfully, bullshit errors saying the database
may have been opened in ReadOnly mode or I'm on a network
that doesn't permit me such access - along with more garbage
error conditions that are completely off the mark.
Nov 22 '06 #1
1 1301
MLH
My apologies - I found my earlier post on this topic. Rich P
<rp*****@aol.co manswered and provided the working solution.

DELETE * FROM tblPreliminaryV INs Where PVIN In (Select SerialNum From
tblVehicleJobs) ;

I am puzzled, though, as to why A97 doesn't run the following SQL:
DELETE tblPreliminaryV INs.*
FROM tblPreliminaryV INs INNER JOIN tblVehicleJobs ON
tblPreliminaryV INs.PVIN = tblVehicleJobs. SerialNum;
Is it just bad code on my part?
Nov 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3847
by: Simon Withers | last post by:
I am using a sql server 2000 database to log the results from a monitor that I have running - essentially every minuite, the table described below has a insert and delete statements similar to the ones below run againt it. Everything is fine for a few weeks, and then without fail, all accesses to the table start slowing down, to the point where even trying to select all rows starts timing out. At that point, the only way to make...
16
17004
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums must be UPDATED, if not, they must be INSERTED. Logically then, I would like to SELECT * FROM <TABLE> WHERE ....<Values entered here>, and then IF FOUND UPDATE <TABLE> SET .... <Values entered here> ELSE INSERT INTO <TABLE> VALUES <Values...
13
3791
by: N. Graves | last post by:
Thanks for take time to read my question!! I'm using code that will automatically delete rows of data in a field and of course when you do this Access will prompt you that you are about to delete x number of rows. Most of the time I want this message be displayed. Can I use code that will delete specified rows and not give the message? Here is the code that I'm currently using:
14
8075
by: Darin | last post by:
I have a table that I want to delete specific records from based on data in other tables. I'm more familiar with Access '97, but am now using 2003, but the database is in 2000 format. In '97, I think I could have easily done this using joins, but I kept getting "could not delete from specified tables" errors. Some google searching has indicated I need to use a subquery. After many failed attempts with different approaches, I finally...
9
1490
by: Scott Ribe | last post by:
OK, I'm using a pool of worker threads that each have a connection (from my own software, no PHP or anything like that involved), and a connection is in a state where all queries fail. Looking back through the log I find the first entry where this connection has an error (there are successful queries on it prior, so it's not the first query): 2004-06-21 14:51:19 LOG: query: begin; set constraints all deferred; insert into...
6
4349
by: manning_news | last post by:
Using A2003. I'm attempting to delete all queries in an mdb. I was experimenting with the following coding and discovered that it deletes exactly half the queries each time it's run. If I have 100 queries, then it deletes 50 the first time it's run. The next time, it deletes 25, and so on. What modifications do I need to make it delete all queries in one execution? Thanks for any help or advice. dbs.QueryDefs.Refresh For Each qdf...
1
1571
by: austin1539 | last post by:
-Access 2002 -Windows XP Pro Trying to run a DELETE Query to delete each entry in the table 'Data' where the field 'AssocID' matches the field 'AssocID' in the table 'Queries' and the date is between the date range in the 'Queries' table. Here is what I have. The query works as a select query, but I cannot get it to run as a delete query. DELETE Data.* FROM Data, Queries WHERE Data.AssocID = Queries.AssocID AND (Data.Date BETWEEN...
3
7252
by: satish | last post by:
hi, CAn i have one trigger for both Update and Delete Delete Trigger --------------------- create Trigger on . for delete as begin insert into z_user_log select * from deleted end
5
6317
by: marshmallowww | last post by:
I have an Access 2000 mde application which uses ADO and pass through queries to communicate with SQL Server 7, 2000 or 2005. Some of my customers, especially those with SQL Server 2005, have had pass-through queries fail due to intermittent connection failures. I can easily restablish a connection for ADO. My problem is with pass-through queries.
0
8458
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8366
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8790
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6206
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2779
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.