🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How to create a combined index?

#167
From: Lothar Brandner
Date: Thu, 26 Apr 2007 12:33
19 lines
1876 bytes
Hello,
I am trying to set up a combined index for an m:n connection between two 
tables. There exists an MS-Access table C which holds the lookup values from 
table A and B. Every possible combination may only exist once.So I defined 
the index for Table C as a unique combination  of both the values from table 
A and B. This works fine: MS Access does not acceppt double 
indices(combinations of values from table A and B).
In my C++-Application (BDS 2006 Enterprise) I use three TADOTables for Table 
A, B and C.
In TAdoTable C I defined two additional data elements as foreign keys for 
table A and B.
Now I can select all possible values each for table A and B, but I could not 
find a way how to avoid double combinations.
If the application's user accidentally generate a combination which already 
exists in the database the application throws an exception (this is correct, 
I told MS access not to accept double indices).
Is there a simple way to tell ADOTable C not to accept multiple indices?
Greetings
Lothar
Technical Details
Message-ID: <46309c2b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,7399149caf6e489f,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Lothar Brandner" <l___dot____brandner_at_wittenstein.de>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: How to create a combined index?
Date: Thu, 26 Apr 2007 14:33:47 +0200
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 62.153.134.35
Message-ID: <46309c2b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1177590827 62.153.134.35 (26 Apr 2007 05:33:47 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail