🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

query insert in many-to-many relation

#4434
From: Paolo Casagrande
Date: Fri, 28 Dec 2001 08:33
15 lines
1494 bytes
TableA are self-linked by TableL (so I have a many-to-many relation). I use
a QueryA (where SQL string is
    SELECT TableA.*, TableL.*
    FROM TableA, TableL
    WHERE TableL.ID1=TableA.ID AND TableL.ID2=:ID
and the DataSource is of TableA, DSA so the parameter ID is set). this find
all records linked to each record of TalbeA and
works fine. Now I have to insert (or append) a new link:
case 1 - the new record is present in TableA (ie is selected from a
ComboBox)
case 2 - the new record is not present in TableA
How do it? I also asking how can I locate the last insert / append record?

Thanks to all,
    Paolo
Technical Details
Message-ID: <3c2c2e6a_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,d63e37dbe96731e6,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-12-28 00:38:44 PST
From: "Paolo Casagrande" <nemesis@intelly.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: query insert in many-to-many relation
Date: Fri, 28 Dec 2001 09:33:47 +0100
Lines: 19
Organization: intellySoft
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 151.25.83.87
Message-ID: <3c2c2e6a_1@dnews>
X-Trace: dnews 1009528426 151.25.83.87 (28 Dec 2001 00:33:46 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews