Subject Re: indexing table
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Tue, 29 Nov 2022 13:09:00 -0800
Newsgroups dbase.getting-started

On 11/29/2022 12:31 PM, Moses Hanna wrote:
> Good Day
>                 local  I
>                 I = form.cldm.INVOICES1.rowset
>                 _app.newinvid = i.fields["invid"].value
>                i.filter = "invid = '" + _app.newinvid + "'"                
>                 u = new UpdateSet()
>               u.source = I
>              u.destination = "invoicereport.DBF"
>            u.copy()
>
>
> I want to index the new table "invoicereport.dbf"
> can i have some help how to do that?

Look at the help for /class index/. The updateset component is the wrong
way to go.

i=new Index()
i.indexName :="indexname"
i.fields :="field1;field2; ..."
// other properties
_app.databases[1].createIndex("tablename",i)

This example assumes you are not using a database object. If you are,
you would need to reference it instead:
    dMyDatabase.createIndex("tablename", i )

Replace things like "indexname", "tablename", "field1 ..." appropriately.

Ken

--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm