BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Primary key - getindexnames

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Lerberg
Guest





PostPosted: Tue Apr 12, 2005 7:05 pm    Post subject: Primary key - getindexnames Reply with quote



Hello!

Have using the following code:

var na1 : tstrings;
begin
{ hente alle indexer }
na1:=tstringlist.create;
na1.Clear;
table1.IndexDefs.update;
table1.getindexnames(na1);

label1.caption:=inttostr(na1.count);

for x:=0 to na1.count-1 do
memo2.Lines.add(na1[x] + '(' + table1.IndexDefs.find(na1[x]).fields +
')');

Have a table with 10 fields, one with 3 fields, and both have all the
fields in the primary index. No secondary fields is created. When I
run the code above, the label1.caption return value 0, and the memo2
don't show anything. What is wrong??

When I run the database desktop and open the table, it shows correct
fields and primary index, and it also excist a file called *.px

When also running a program called DSP, Database Structure Program,
that also shows excact same result then Database Desktop, so it must
be something wrong with my code.

Please let me know what's wrong!!

TIA
Kåre
[email]lerberg (AT) c2i (DOT) net[/email]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.