|
Log in | ||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Would someone please help me with adding an index to an existing file using the DataDictionary components. I have no problem adding data fields and restructuring the file, but have not been able to get the index add function to work.My problem is this: The file I am trying to update is called 'InvRcvd'. It already has two indicies in addition to Seq. Access. I want to check to see if an index called 'RcptID' is present and if not I want to add it. The index consists of a single string field 'ReceiptID'. Any help would be much appreciated. |
|
#2
|
|||
|
|||
|
Steve_A wrote:
Hi Steve, I guess you are using the restructuring code that is posted somewhere on the Nexus website. Use the following as step 1 to determine if the index needs to be added: AddIndex := Dict.IndicesDescriptor.GetIndexFromName('MyIndex') = -1; Step 2, when NewDict has been created: with NewDict.EnsureIndicesDescriptor do with AddIndex('MyIndex', 0, idAll), KeyDescriptor as TnxCompKeyDescriptor do with Add(NewDict.FieldsDescriptor.GetFieldFromName('MyF ield'), TnxTextKeyFieldDescriptor) as TnxTextKeyFieldDescriptor do IgnoreCase := True; Bert |
|
#3
|
|||
|
|||
|
Thank you very much. It worked perfectly.
Steve ![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding a Sequential Access Index | Luke Johnston | nexusdb.public.support | 2 | 12th October 2007 06:38 AM |
| Adding Index | Andrew Sowerby | nexusdb.public.support | 1 | 14th February 2007 10:08 PM |
| error adding an index | Daniele | nexusdb.public.support | 0 | 10th August 2006 11:49 PM |
| Does adding a new index reload all the data into the table? | Brent | nexusdb.public.discussions | 12 | 1st June 2006 10:25 AM |
| EM 3 - Error adding index | Roy Granich | nexusdb.public.support | 13 | 13th July 2003 07:26 PM |