Paradox Community

Items in pnews.paradox-programming

Subject:Re: Creating Secondary Index
Date:Mon, 18 Dec 2023 13:07:26 -0800
From:Peter <peterspammenot@whiteknight.email>
Newsgroups:pnews.paradox-programming
Did you look at the CreateIndex method?
Yup, that is what I used. I saw it allows using a dynarray. Thanks.



On 12/15/2023 12:11 p.m., Kevin Zawicki wrote:
>>
>   It does work if the string itself is used.
> <
> 
> strFields = "\"Assignee\",\"TStatus\",\"DueDate\",\"Cat\""
> 
> 
> Since INDEX uses structure scheme, not a method, I don't think it would take
> a var there.
> 
> 
> Did you look at the CreateIndex method?
> 
> 
> Peter <peterspammenot@whiteknight.email> wrote:
>> Back on this project
>> They are the field names in the table
>>
>>
>>
>> On 05/06/2018 05:09 a.m., Steven Green wrote:
>>>> strFields = "\"Assignee\",\"TStatus\",\"DueDate\",\"Cat\""
>>>
>>> are these examples the field names or the vars? you have the syntax
>>> kinda half-and-half
>>>
>>>
>>> -- 
>>>
>>> Steven Green
>>> Myrtle Beach, South Carolina, USA
>>>
>>> http://www.OasisTradingPost.com
>>>
>>> Collectibles and Memorabilia
>>> Vintage Lego Sets and Parts
>>> - and Paradox support, too
>>> "Peter"  wrote in message news:5aec8dd5$1@pnews.thedbcommunity.com...
>>>
>>> Lots of posts on this topic but I did not find anything that addressed
>>> this question.
>>>
>>> The following code does not work if using a string variable (strfields,
>>> strname)in the indexing block. It does work if the string itself is
>>> used. Shouldn't it accept a string variable? Thank you for any comments.
>>>
>>> strFields = "\"Assignee\",\"TStatus\",\"DueDate\",\"Cat\""
>>> strname = "AssStaDue"
>>>
>>> tbl.attach(strTbl)
>>> ;create secondary index
>>> if tbl.lock("FULL") then
>>>      Index tbl
>>>        maintained on strfields
>>>        to strname
>>>      endIndex
>>> else
>>>      msgInfo("TABLE LOCK","Cannot lock the table to restructure")
>>>      errorShow()
>>> endIf
>>>
>>> tbl.unlock("FULL")
> 


Copyright © 2004 thedbcommunity.com