🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #554

TADOQuery->Delete() - not the Lookup-Table

#554
From: Matthias Schuppe
Date: Tue, 15 Nov 2005 17:41
31 lines
1906 bytes
Hi all,

  I have the following two tables:

"Customers"
ID   Name
-----------------
 2   Customer 1
 4   Customer 2

"Orders"
CustomerID   Order
---------------------
     2       Order 1
     4       Order 2
     4       Order 3
     2       Order 4

  I use "TADOQuery" to get the Data as following:

SELECT Orders.Order, Customers.Name AS CustomersName
FROM Orders
JOIN Customers ON (Orders.CustomerID = Customers.ID)

  It works well, it's possible to edit and insert the Datasets. But
when I try to delete e.g. "Order 3" by calling "TADOQuery->Delete();"
not only this Dataset ist deleted, the Query kills also the connected
"Customer 2" in the "Customers"-Table. Is it possible to tell the Query
to delete Datasets only in the "Orders"-Table?

Matthias Schuppe
Technical Details
Message-ID: <1132076491.723482.148690@g49g2000cwa.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g49g2000cwa.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,da4279c12139c171,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g49g2000cwa.googlegroups.com!not-for-mail
From: "Matthias Schuppe" <matthias2378@gmx.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: TADOQuery->Delete() - not the Lookup-Table
Date: 15 Nov 2005 09:41:31 -0800
Organization: http://groups.google.com
Lines: 32
Message-ID: <1132076491.723482.148690@g49g2000cwa.googlegroups.com>
NNTP-Posting-Host: 213.7.219.111
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1132076496 4393 127.0.0.1 (15 Nov 2005 17:41:36 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 15 Nov 2005 17:41:36 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.2 (like Gecko),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: g49g2000cwa.googlegroups.com; posting-host=213.7.219.111;
   posting-account=vbpoEA0AAAASAAIOV_S98BHLQC06R3Qn