🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How to create a primary key in MS Access 2000 with TFieldDefs?

#4751
From: hero
Date: Sat, 13 Oct 2001 10:15
13 lines
1257 bytes
When I create a primary key ,I meet a few questions.

TFieldDefs *pDef;
pDef=TTable->TFieldDefs->AddFieldDefs();
pDef->Name="pk";
pDef->Fields="Field1";
pDef->Options<<ixPrimary;

TTable->CreateTable();

But when I open my MS Access databse,I found Field1 don't have any primary
key.Though C++ builder database tools,find PK index ,but not primary key.
How to resolve it?
Technical Details
Message-ID: <3bc8133a_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!xmission!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,1232f39770192ae2,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-10-13 03:28:25 PST
From: "hero" <hero_k@163.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: How to create a primary key in MS Access 2000 with TFieldDefs?
Date: Sat, 13 Oct 2001 18:15:00 +0800
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 211.149.27.135
Message-ID: <3bc8133a_2@dnews>
X-Trace: dnews 1002967866 211.149.27.135 (13 Oct 2001 03:11:06 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!xmission!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews