Paradox Community

Items in pnews.paradox-programming

Subject:Creating Secondary Index
Date:Fri, 4 May 2018 09:44:17 -0700
From:Peter <peter@whiteknight.email>
Newsgroups:pnews.paradox-programming
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