I have a v8 runtime application that I am trying to upgrade to v10 and I am getting 'Not available in the Runtime.' error when I open the database on the runtime installation.
I am under the impression that this has to do with a couple of scripts/xbasic code I have running on opening of the main menu. Where can I find information on what is not allowed in the runtime version and why?
My script basically copies some records, does some updates and joins. Full code is below.
I am not sure what would be causing this error. I know it is a lot of information to be running on a startup but it needs to run because all of my reporting data is generated from an external source and updated nightly. Really dumb system but it is the way it was setup before I was here and I am going to start the process of creating a brand new application to eliminate this.
Any help is greatly appreciated!!
I am under the impression that this has to do with a couple of scripts/xbasic code I have running on opening of the main menu. Where can I find information on what is not allowed in the runtime version and why?
My script basically copies some records, does some updates and joins. Full code is below.
I am not sure what would be causing this error. I know it is a lot of information to be running on a startup but it needs to run because all of my reporting data is generated from an external source and updated nightly. Really dumb system but it is the way it was setup before I was here and I am going to start the process of creating a brand new application to eliminate this.
Any help is greatly appreciated!!
Code:
tbl = table.open("preparecheck.dbf") tbl.fetch_first() If tbl.date = date() end else 'Date Created: 03-Jan-2007 04:35:37 PM 'Last Updated: 26-Jan-2007 11:26:57 AM 'Created By : casy 'Updated By : casy 'In case the destination table name is stored as a relative file name, or uses an alias 'in the drive/path specification, use the filename_decode() function to convert the 'filename to an absolute filename. copy_db_name = filename_decode("z:\ttioqs\search\mostrecenttooldata.dbf") dim a_tbl as p a_tbl = table.open("reporting_data") ON ERROR GOTO ERROR03012007163318532 DIM a5_operation_order as C a5_operation_order = "invert(cdate(Datereceiv))" query.order = a5_operation_order DIM a5_operation_filter as C a5_operation_filter = a5_combine_filters(".T.",".t.",.f.) query.filter = a5_operation_filter query.options = "I" query.description = "Temporary Query" i_indx = a_tbl.query_create() copy.set = "" copy.db = copy_db_name copy.dd = .F. copy.delete_o_dd = .F. copy.records = .T. copy.fields = 16 copy.field1 = "Customer" copy.field2 = "Make" copy.field3 = "Model" copy.field4 = "Serial" copy.field5 = "Gageid" copy.field6 = "Caldate" copy.field7 = "Datereceiv" copy.field8 = "Lab" copy.field9 = "Field130" copy.field10 = "Adjcertc" copy.field11 = "Contact" copy.field12 = "Address" copy.field13 = "City" copy.field14 = "State" copy.field15 = "Zip" copy.field16 = "Field129" a_tbl.copy() GOTO CONTINUE03012007163318532 ERROR03012007163318532: ON ERROR GOTO 0 ui_msg_box("Error","Error running Copy Operation"+crlf()+error_text_get()) END CONTINUE03012007163318532: a_tbl.close() 'Add the table just created by the Copy operation to the Database.. file_add_to_db(copy_db_name) a_tbl = table.open("mostrecenttooldata") ON ERROR GOTO ERROR03012007163457998 a_tbl.delete_dups("CUSTOMER-SERIAL",".T."+".and. .t.") GOTO CONTINUE03012007163457998 ERROR03012007163457998: ON ERROR GOTO 0 ui_msg_box("Error","Error running Mark/Un-mark/Delete Operation"+crlf()+error_text_get()) END CONTINUE03012007163457998: a_tbl.close() 'If the Operation is run from within a Form or Browse, then refresh the window if is_object(topparent.this) then if topparent.Class() = "form" .or. topparent.class() = "browse" then topparent.Refresh_layout() end if end if a_tbl = table.open("mostrecenttooldata") ON ERROR GOTO ERROR24012007105543429 DIM a5_operation_order as C a5_operation_order = "" query.order = a5_operation_order DIM a5_operation_filter as C a5_operation_filter = ".T." query.filter = a5_operation_filter query.options = "I" query.description = "Temporary Query" i_indx = a_tbl.query_create("N") update.fields = 1 update.field1 = "FIELD129" update.expr1 = "addyears(FIELD129,1)" a_tbl.update() GOTO CONTINUE24012007105543429 ERROR24012007105543429: ON ERROR GOTO 0 ui_msg_box("Error","Error running Update Operation"+crlf()+error_text_get()) END CONTINUE24012007105543429: a_tbl.close() 'If the Operation is run from within a Form or Browse, then refresh the window if is_object(topparent.this) then if topparent.Class() = "form" .or. topparent.class() = "browse" then topparent.Refresh_layout() end if end if tbl.change_begin() tbl.date = date() tbl.change_end(.t.) end if tbl.close() end 'In case the destination table name is stored as a relative file name, or uses an alias 'in the drive/path specification, use the filename_decode() function to convert the 'filename to an absolute filename. target_table_name = filename_decode("costowithemails.dbf") a_tbl = table.open("mostrecenttooldata") ON ERROR GOTO ERROR27042007085239700 join.t_db = "costcoregional" join.o_file = target_table_name join.m_key = "CUSTOMER" join.t_key = "STORE" join.m_filter = "containsi(Customer,\"Costco\") .AND. Lab = \"T\" .AND. Serial <> \"Parts Only\"" join.t_filter = "" join.m_count = 22 join.delete_o_dd = .F. join.m_field1 = "Customer" join.m_field2 = "Make" join.m_field3 = "Model" join.m_field4 = "Serial" join.m_field5 = "Gageid" join.m_field6 = "Caldate" join.m_field7 = "Datereceiv" join.m_field8 = "Lab" join.m_field9 = "Field130" join.m_field10 = "Adjcertc" join.m_field11 = "Contact" join.m_field12 = "Address" join.m_field13 = "City" join.m_field14 = "State" join.m_field15 = "Zip" join.m_field16 = "Field129" join.m_field17 = "@Costcoregional->Store" join.m_field18 = "@Costcoregional->Regional" join.m_field19 = "@Costcoregional->Email" join.m_field20 = "@Costcoregional->Tiremanager" join.m_field21 = "@COSTCOREGIONAL->WAREHOUSEMANAGER" join.m_field22 = "@COSTCOREGIONAL->ASSISTANTMANAGER" a_tbl.join() GOTO CONTINUE27042007085239700 ERROR27042007085239700: ON ERROR GOTO 0 ui_msg_box("Error","Error running Join/Subtract/Intersect Operation"+crlf()+error_text_get()) END CONTINUE27042007085239700: a_tbl.close() 'Add the table just created by the Join Operation to the Database... file_add_to_db(target_table_name) a_tbl = table.current() query.order = "recno()" query.filter = "containsi(Customer,\"Costco\")" query.options = "I" a_tbl.query_create() update.fields = 3 update.field1 = "Tiremanager" update.expr1 = "\"w\"+right(alltrim(Customer),3)+\"[email protected]\"" update.field2 = "WAREHOUSEMANAGER" update.expr2 = "\"w\"+right(alltrim(Customer),3)+\"[email protected]\"" update.field3 = "ASSISTANTMANAGER" update.expr3 = "\"w\"+right(alltrim(Customer),3)+\"[email protected]\"" a_tbl.update()
Comment