🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages Started by Matthias Schuppe Tue, 15 Nov 2005 17:41
TADOQuery->Delete() - not the Lookup-Table
#554
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads