I am running a Join Operation... it creates a table named JoinCPODetail.dbf
The problem I'm having is that the two indexes that I need are deleted when the table is updated...
so... I wrote the following script:
'When the Joincpodetail table is updtaed / created the indexes are destroyed... this script saves the index definitions... runs the join... then recreaes the indexes
'Consultnum All Ascending, DateToProcess All Decending
'dim IndexDefs As C
dim t As P
'IndexDefs = Get_Index_Definitions("JoincpoDetail")
'Run a saved 'Join' operation: 'JoinCPODetail'.
query.filter = ""
query.order = ""
DIM operation_name as c
operation_name = "JoinCPODetail"
If operation_name <> "" then
join.run(operation_name,query.filter , "")
End if
ui_msg_box("CONSULTNUM AND DtoP INDEXES WILL BE RECREATED","CONSULTNUM AND DtoP INDEXES WILL BE RECREATED",UI_ATTENTION_SYMBOL+UI_OK)
'Result = CREATE_INDEXES("JoinCPODetail", "IndexDefs", .t. )
t = Table.open("JoinCPODetail",FILE_RW_EXCLUSIVE)
t.index_create_begin("Consultnum","Consultnum","","")
t.index_create_end()
t.index_create_begin("DtoP","Datetoprocess","","")
t.index_create_end()
t.close()
ui_msg_box("Indexes Hve Been Re-Created", "Indexes Hve Been Re-Created",UI_INFORMATION_SYMBOL+UI_OK)
The script creates the first index 'Consultants'... but not the second 'DtoP'
Also I want the second index to be Descending All
How can I do this?
Thanks D
The problem I'm having is that the two indexes that I need are deleted when the table is updated...
so... I wrote the following script:
'When the Joincpodetail table is updtaed / created the indexes are destroyed... this script saves the index definitions... runs the join... then recreaes the indexes
'Consultnum All Ascending, DateToProcess All Decending
'dim IndexDefs As C
dim t As P
'IndexDefs = Get_Index_Definitions("JoincpoDetail")
'Run a saved 'Join' operation: 'JoinCPODetail'.
query.filter = ""
query.order = ""
DIM operation_name as c
operation_name = "JoinCPODetail"
If operation_name <> "" then
join.run(operation_name,query.filter , "")
End if
ui_msg_box("CONSULTNUM AND DtoP INDEXES WILL BE RECREATED","CONSULTNUM AND DtoP INDEXES WILL BE RECREATED",UI_ATTENTION_SYMBOL+UI_OK)
'Result = CREATE_INDEXES("JoinCPODetail", "IndexDefs", .t. )
t = Table.open("JoinCPODetail",FILE_RW_EXCLUSIVE)
t.index_create_begin("Consultnum","Consultnum","","")
t.index_create_end()
t.index_create_begin("DtoP","Datetoprocess","","")
t.index_create_end()
t.close()
ui_msg_box("Indexes Hve Been Re-Created", "Indexes Hve Been Re-Created",UI_INFORMATION_SYMBOL+UI_OK)
The script creates the first index 'Consultants'... but not the second 'DtoP'
Also I want the second index to be Descending All
How can I do this?
Thanks D
Comment