Board index » delphi » How to get indexed fileds in a secondary index file at run time
Alberto
![]() Delphi Developer |
Sat, 04 Dec 2004 00:33:38 GMT
|
Alberto
![]() Delphi Developer |
Sat, 04 Dec 2004 00:33:38 GMT
How to get indexed fileds in a secondary index file at run time
I am developing a program that needs to create and modify tables at run
time. So far I can create the tables and datasources. I also created a property editor for the tables. I created a form similar to the File Link Designer to set the Master Fields. When I double Click the MasterFields in my Table Property editor It will show the File Link Designer showing the MasterSource Fields and the Available Indexes. Now I want to know how to get the Indexed fields when I click in the Index I tried using GetDetailLinkFields(MasterField,DetailField); but does not Thanks. Alberto |
Brian Bushay Team
![]() Delphi Developer |
Sat, 04 Dec 2004 10:55:02 GMT
Re:How to get indexed fileds in a secondary index file at run timeQuote>Now I want to know how to get the Indexed fields when I click in the Index IndexDefs and look at the Fields property of each IndexDef -- Brian Bushay (TeamB) Bbus...@NMPLS.com |
Albert
![]() Delphi Developer |
Sun, 05 Dec 2004 03:32:47 GMT
Re:How to get indexed fileds in a secondary index file at run timeYes so far using dbf or db. I did what you suggested but it reurn 0 to the for loop Ok here what I do. I get the Table index name using GetIndexName as follows: with Form1.FindComponent(tmpName) as TTable do Now clicking any index field in dbIndexName Combobox and using IndexDefs with Form1.FindComponent(dbTName.Text) as TTable do This will fill the ListBox3 with the IndexNames and not with the fields When I click in any of the indexName, I want to be able to get the index If I have a Table Name Clients and have foru indexes for it like I want that when I click Name index it tells me that the field use for index Thanks for your support. If yoy ar not clear let me know. Alberto, "Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message Quote
|
Bill Tod
![]() Delphi Developer |
Sun, 05 Dec 2004 05:11:57 GMT
Re:How to get indexed fileds in a secondary index file at run timeIt sounds like you are tring to list the fields that comprise the index in the listbox. If so, you need something like this (not tested). with Form1.FindComponent(dbTName.Text) as TTable do On Tue, 18 Jun 2002 15:32:47 -0400, "Alberto" <chap...@bellsouth.net> Quote>with Form1.FindComponent(dbTName.Text) as TTable do Bill (TeamB) (TeamB cannot respond to questions received via email) |
Brian Bushay Team
![]() Delphi Developer |
Sun, 05 Dec 2004 08:24:08 GMT
Re:How to get indexed fileds in a secondary index file at run timeQuote>Yes so far using dbf or db. I did what you suggested but it reurn 0 to the -- |
Albert
![]() Delphi Developer |
Sun, 05 Dec 2004 10:41:32 GMT
Re:How to get indexed fileds in a secondary index file at run timeThansk Master!!! I followed You but using FldNames.Delimiter := ';'; generate the following error undeclared identifier Delimiter I checked the TStringList Properties and I don't see this properties. If I remove the above lines and use ListBox3.ItemsAdd( IndexDefs[I].Fields); it works except for index that have But the best thing about all of this is that I am getting why I'm trying to Alberto Quote"Bill Todd" <b...@notthis.dbginc.com> wrote in message Quote> It sounds like you are tring to list the fields that comprise the |
Bill Tod
![]() Delphi Developer |
Sun, 05 Dec 2004 21:55:31 GMT
Re:How to get indexed fileds in a secondary index file at run timeSee the properties for TStringList in the Delphi 6 on-line help. Both Delimiter and DelimitedText are listed and they work for me. Make sure the Classes unit is in your uses clause. On Tue, 18 Jun 2002 22:41:32 -0400, "Alberto" <chap...@bellsouth.net> Quote>Thansk Master!!! Bill (TeamB) (TeamB cannot respond to questions received via email) |
Albert
![]() Delphi Developer |
Mon, 06 Dec 2004 08:36:00 GMT
Re:How to get indexed fileds in a secondary index file at run timeMaybe they are not in Delphi 5 which is the one I am using. Is there any way to upgrade The TStringList classes in D5? Thanks again. Alberto Quote"Bill Todd" <b...@notthis.dbginc.com> wrote in message Quote> See the properties for TStringList in the Delphi 6 on-line help. Both |
Bill Tod
![]() Delphi Developer |
Mon, 06 Dec 2004 09:20:14 GMT
Re:How to get indexed fileds in a secondary index file at run timeFor future reference, if you are not using the current version of Delphi it helps if you let us know which version you are using. There is no way to update the TStringList functionality in D5 unless you want to try to make the changes yourself. To solve your problem scan the string and replace all semicolons with On Wed, 19 Jun 2002 20:36:00 -0400, "Alberto" <chap...@bellsouth.net> Quote>Maybe they are not in Delphi 5 which is the one I am using. Bill (TeamB) (TeamB cannot respond to questions received via email) |
Albert
![]() Delphi Developer |
Mon, 06 Dec 2004 22:21:44 GMT
Re:How to get indexed fileds in a secondary index file at run timeOk Bill I will, Now going back to de fields dilemma digging in in IndexDefs I encounter the I just change the FldNames:TStringList to FldNames:String here is the code with Form1.FindComponent(dbTName.Text) as TTable do Thanks for your join actions. Alberto Quote"Bill Todd" <b...@notthis.dbginc.com> wrote in message Quote> For future reference, if you are not using the current version of - Hide quoted text - - Show quoted text - Quote> >> >> wrote: |
1. How can I add secondary index at run time
2. Run-time problem using secondary indexes
3. Adding Secondary Indexes without a Primary Index
4. Do I need a secondary index on a field that is part of a key index
5. CREATE INDEX SQL DOES NOT GENERATE .MDX FILE AT RUN-TIME
6. Group report based on secondary index file
7. Problem with Secondary Indexes in Paradox files
8. Group report based on secondary index file