Having Problems with concatenated indexes (primary keys) 
Author Message
 Having Problems with concatenated indexes (primary keys)

HELP!!!

I am having difficulties defining a concatenated Index.
My index should consist out of PC_Number and Component_Number, two
fields in a table.

This is what I used to do in VB3:
Dim IDX As New Index
IDX.Name = "PC_Comp_Idx"
IDX.Fields = "PC_Number ; Component_Number"
IDX.Primary = true
IDX.Unique = true

This is what I'm doing in VB4
Dim PCIdx As Index
Dim IxFld(0 to 1) As Field  'Used in another case to define two index

                                                   'fields
Set PCIdx = PCTb.CreateIndex("PC_Comp_ID")
PCIdx.Primary = True
PCIdx.Unique = True
Set IxFld(0) = PCIdx.CreateField("txtPC_Number ; txtComponent_Number")

I know I'm doing something wrong, PLEASE if you've got any help
E-Mail me

Thanks in advance
PJ Groenewoud




Mon, 09 Nov 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Help, Concatenated Indexes (primary keys)

2. Help, Concatenated Indexes (primary keys)

3. Primary Key - Index Problem.

4. Concatenated primary key using VB Code

5. Having trouble accessing single field key with two concatenated fields

6. Joined Primary Key in Foxpro (Make 1 Primary Key from 2 fields)

7. Indexes - Primary key naming conventions

8. Duplicate Value in Index/Primary Key Error

9. Primary Key Indexes

10. Using a GUID as a Primary Key or indexing a GUID

11. unique primary keys (indices)

12. A problem concatenating the index property of an control array

 

 
Powered by phpBB® Forum Software