Index update form/routine (OpenInsight Specific)
At 29 APR 1998 05:47:46PM B. Cameron wrote:
Can I call the Database Mgr update index form/routine from within my own form?
At 29 APR 1998 10:30PM Bruce Cameron wrote:
Bruce,
If you're looking at the Update_Index routine then yes, you can call it from pretty much anywhere.
At 30 APR 1998 08:03AM Edipus wrote:
Thanks,
I don't remember answering my own question?
Who said that?
At 30 APR 1998 10:48AM Dave Pociu wrote:
Actually, it was me… that's what happens when I try to answer questions at 11:30 at night.
And before you ask, no, I wasn't hitting the bottle at the time ;)
At 30 APR 1998 12:16PM B. Cameron wrote:
Fair enough Dave. how are ya?
So I guess I need to create my own forms to perform the index update
visual process as seen in the database mgr.?
At 30 APR 1998 12:42PM Dave Pociu wrote:
Well, if you want the exact forms from DB Manager, I'm not really sure. They might be OI forms but I didn't take the time to look for them. I'll let you know if I do.
On the other hand you can probably quickly whip something up using LIST_INDEX, CREATE_INDEX and UPDATE_INDEX if needed.
At 30 APR 1998 01:50PM BC wrote:
Thanks, that's what I have been doing. Just wanted to see if I had to
recreate the wheel.
Bruce
At 30 APR 1998 05:11PM BC wrote:
Dave,
Here's part of what I ended up doing….
Declare Subroutine Set_Property,List_Index
Declare Function Get_Property
Set_Property ("SYSTEM", "RECEIVER", @window:".EDITBOX1")
Set_Property (@window: ".EDITBOX1", "TEXT", "")
Call List_Index(
,
,) Tables=Get_Property (@window: ".EDITBOX1","TEXT") swap \0D0A\ with @vm in Tables Set_Property ("SYSTEM", "RECEIVER", "") swap @vm with @fm in Tables tot=count(Tables,@fm) + (Tables # "") iTables=" for val=1 to tot Locate Tables In iTables Using @fm Setting Pos Else if Tables1,3 # "SYS" then iTables=Tables end end next val .TABLE1-]LIST=iTables ————————————- Fills the edittable after stripping dup names and SYS??? names. Crude but gets me going. Bruce </QUOTE> —- === At 30 APR 1998 08:14PM Dave Pociu wrote: === <QUOTE>Hi Bruce, Crude but OK ;) Here's some more code from a global write event procedure of mine. What I do is to force an update of any existing Btree index that the current form has written to. Note the use of the (undocumented I believe) SET_ROWDEF procedure! Without it all you get is the first column of LIST_INDEX, and therefore nothing about the kind of indexes that you have in the table. if table_name #
thenlocate table_name in list using @fm setting pos thennullend elselist=table_nameindexed_columns=' ;
capture text results of list_users= Set("SYSTEM", "RECEIVER", "MENU_FORM.RECEIVER")= set( "MENU_FORM.RECEIVER" , 'TEXT' , '')call set_rowdef(\0101010101\)list_index(table_name , '' , '1')= Set("SYSTEM", "RECEIVER", "")indexed_columns=Get( "MENU_FORM.RECEIVER", "TEXTVAL")if indexed_columns thenupdate_index( table_name , '' , '')error=get_status(status_code)if error thencall send_event( @window , "SYSMSG" , "TABLE_ERROR" , 0 , status_code)endendendend
At 01 MAY 1998 04:18PM Cameron Revelation wrote:
Bruce,
There is the background indexer (the "seconds" option in db mgr options). There is a dedicated indexer … search for "set_bgnd…" in the help file. There is also an update_index function which can update all indexes (if you pass null params). Are any of these what you are looking for?
Cameron Purdy
Revelation Software
At 01 MAY 1998 04:33PM B Cameron wrote:
Cameron,
Yes, actually, some all and none.
I was wondering if the db mgr routine was s"bundled" up so that I could just call it as it. But.. in the mean time I wrote code to display any users logged on, then used the receiver to fill an edit table and then ater the user selected the tables I call the rebuild/update.
My "modus" is usually "WYCS WYCS" so I tried here first.
Thanks, Bruce ;)