I used the Genie to create an append operation from a native alpha table to a AlphaDAO linked MySql table. Both of the tables are identical, and the append operation works when the "All" option is selected. However, if I try the "Unique only" or "Unique, replace existing" options in the append operation I get "Error running append operation Error 6000".
This error is not explained in any of the documentation that I have found, nor was a similar question answered back in May.
Please help. Here's my XBasic code:
DIM Append as P
a_tbl = table.open("tblpostingdata")
append.t_db = "tblpostingdataimport"
ON ERROR GOTO ERROR01092008091712734
append.m_key = "RETRECID"
append.t_key = "RETRECID"
append.m_filter = ""
append.t_filter = ""
append.type = "Unique only"
append.m_count = 31
append.m_field1 = "RETRECID"
append.m_exp1 = "@TBLPOSTINGDATAIMPORT->RETRECID"
append.m_field2 = "RECTYPECODE"
append.m_exp2 = "@TBLPOSTINGDATAIMPORT->RECTYPECODE"
append.m_field3 = "TRANSACTIONCODE"
append.m_exp3 = "@TBLPOSTINGDATAIMPORT->TRANSACTIONCODE"
append.m_field4 = "RDFIIDENTIFICATION"
append.m_exp4 = "@TBLPOSTINGDATAIMPORT->RDFIIDENTIFICATION"
append.m_field5 = "CHECKDIGIT"
append.m_exp5 = "@TBLPOSTINGDATAIMPORT->CHECKDIGIT"
append.m_field6 = "DFIACCOUNTNUM"
append.m_exp6 = "@TBLPOSTINGDATAIMPORT->DFIACCOUNTNUM"
append.m_field7 = "AMOUNT"
append.m_exp7 = "@TBLPOSTINGDATAIMPORT->AMOUNT"
append.m_field8 = "CHECKNUM"
append.m_exp8 = "@TBLPOSTINGDATAIMPORT->CHECKNUM"
append.m_field9 = "INDIVIDUALNAMEARC"
append.m_exp9 = "@TBLPOSTINGDATAIMPORT->INDIVIDUALNAMEARC"
append.m_field10 = "INDIVIDUALNAMERCK"
append.m_exp10 = "@TBLPOSTINGDATAIMPORT->INDIVIDUALNAMERCK"
append.m_field11 = "DISCRDATA"
append.m_exp11 = "@TBLPOSTINGDATAIMPORT->DISCRDATA"
append.m_field12 = "ADDRECINDICATOR"
append.m_exp12 = "@TBLPOSTINGDATAIMPORT->ADDRECINDICATOR"
append.m_field13 = "TRACENUMBER"
append.m_exp13 = "@TBLPOSTINGDATAIMPORT->TRACENUMBER"
append.m_field14 = "POSTINGFORMAT"
append.m_exp14 = "@TBLPOSTINGDATAIMPORT->POSTINGFORMAT"
append.m_field15 = "STATUS"
append.m_exp15 = "@TBLPOSTINGDATAIMPORT->STATUS"
append.m_field16 = "TRANSACTIONSTAMP"
append.m_exp16 = "@TBLPOSTINGDATAIMPORT->TRANSACTIONSTAMP"
append.m_field17 = "FRONTIMAGE"
append.m_exp17 = "@TBLPOSTINGDATAIMPORT->FRONTIMAGE"
append.m_field18 = "BACKIMAGE"
append.m_exp18 = "@TBLPOSTINGDATAIMPORT->BACKIMAGE"
append.m_field19 = "RETURNREASON"
append.m_exp19 = "@TBLPOSTINGDATAIMPORT->RETURNREASON"
append.m_field20 = "BOFDBUSDATE"
append.m_exp20 = "@TBLPOSTINGDATAIMPORT->BOFDBUSDATE"
append.m_field21 = "BOFDROUTINGNUM"
append.m_exp21 = "@TBLPOSTINGDATAIMPORT->BOFDROUTINGNUM"
append.m_field22 = "ONUSRETURNRECORD"
append.m_exp22 = "@TBLPOSTINGDATAIMPORT->ONUSRETURNRECORD"
append.m_field23 = "EXTERNALPROCCODE"
append.m_exp23 = "@TBLPOSTINGDATAIMPORT->EXTERNALPROCCODE"
append.m_field24 = "PBROUTINGNUM"
append.m_exp24 = "@TBLPOSTINGDATAIMPORT->PBROUTINGNUM"
append.m_field25 = "PBROUTINGNUMCD"
append.m_exp25 = "@TBLPOSTINGDATAIMPORT->PBROUTINGNUMCD"
append.m_field26 = "IMGCREATORDATE"
append.m_exp26 = "@TBLPOSTINGDATAIMPORT->IMGCREATORDATE"
append.m_field27 = "BOFD8"
append.m_exp27 = "@TBLPOSTINGDATAIMPORT->BOFD8"
append.m_field28 = "RESPONSE"
append.m_exp28 = "@TBLPOSTINGDATAIMPORT->RESPONSE"
append.m_field29 = "CALLDATE"
append.m_exp29 = "@TBLPOSTINGDATAIMPORT->CALLDATE"
append.m_field30 = "CALLTIME"
append.m_exp30 = "@TBLPOSTINGDATAIMPORT->CALLTIME"
append.m_field31 = "TIMESPRESENTED"
append.m_exp31 = "@TBLPOSTINGDATAIMPORT->TIMESPRESENTED"
append.t_count = 0
'Prompt for confirmation before running the Operation.......
dim rec_count as n
rec_count = a5_get_records_in_query("tblpostingdataimport",append.t_filter,-1,.f.)
message_text = "A maximum of "+rec_count + " record(s) will be appended from 'tblpostingdataimport', to 'tblpostingdata'. "+crlf(2)+ "OK to proceed?"
operation_result=ui_msg_box("Append Operation",message_text,UI_OK_CANCEL+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
If operation_result <> ui_ok_selected then
end
end if
a_tbl.append()
GOTO CONTINUE01092008091712734
ERROR01092008091712734:
ON ERROR GOTO 0
ui_msg_box("Error","Error running Append Operation"+crlf()+error_text_get())
END
CONTINUE01092008091712734:
a_tbl.close()
'Display a dialog box showing the results of the Operation
dim args as sql::arguments
if eval_valid("arguments") then
if typeof(arguments) = "P" then
args = arguments
end if
end if
a5_append_op_result(a_records_processed,a_records_total,a_records_violated, "tblpostingdata","Append Operation Result",args)
'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
This error is not explained in any of the documentation that I have found, nor was a similar question answered back in May.
Please help. Here's my XBasic code:
DIM Append as P
a_tbl = table.open("tblpostingdata")
append.t_db = "tblpostingdataimport"
ON ERROR GOTO ERROR01092008091712734
append.m_key = "RETRECID"
append.t_key = "RETRECID"
append.m_filter = ""
append.t_filter = ""
append.type = "Unique only"
append.m_count = 31
append.m_field1 = "RETRECID"
append.m_exp1 = "@TBLPOSTINGDATAIMPORT->RETRECID"
append.m_field2 = "RECTYPECODE"
append.m_exp2 = "@TBLPOSTINGDATAIMPORT->RECTYPECODE"
append.m_field3 = "TRANSACTIONCODE"
append.m_exp3 = "@TBLPOSTINGDATAIMPORT->TRANSACTIONCODE"
append.m_field4 = "RDFIIDENTIFICATION"
append.m_exp4 = "@TBLPOSTINGDATAIMPORT->RDFIIDENTIFICATION"
append.m_field5 = "CHECKDIGIT"
append.m_exp5 = "@TBLPOSTINGDATAIMPORT->CHECKDIGIT"
append.m_field6 = "DFIACCOUNTNUM"
append.m_exp6 = "@TBLPOSTINGDATAIMPORT->DFIACCOUNTNUM"
append.m_field7 = "AMOUNT"
append.m_exp7 = "@TBLPOSTINGDATAIMPORT->AMOUNT"
append.m_field8 = "CHECKNUM"
append.m_exp8 = "@TBLPOSTINGDATAIMPORT->CHECKNUM"
append.m_field9 = "INDIVIDUALNAMEARC"
append.m_exp9 = "@TBLPOSTINGDATAIMPORT->INDIVIDUALNAMEARC"
append.m_field10 = "INDIVIDUALNAMERCK"
append.m_exp10 = "@TBLPOSTINGDATAIMPORT->INDIVIDUALNAMERCK"
append.m_field11 = "DISCRDATA"
append.m_exp11 = "@TBLPOSTINGDATAIMPORT->DISCRDATA"
append.m_field12 = "ADDRECINDICATOR"
append.m_exp12 = "@TBLPOSTINGDATAIMPORT->ADDRECINDICATOR"
append.m_field13 = "TRACENUMBER"
append.m_exp13 = "@TBLPOSTINGDATAIMPORT->TRACENUMBER"
append.m_field14 = "POSTINGFORMAT"
append.m_exp14 = "@TBLPOSTINGDATAIMPORT->POSTINGFORMAT"
append.m_field15 = "STATUS"
append.m_exp15 = "@TBLPOSTINGDATAIMPORT->STATUS"
append.m_field16 = "TRANSACTIONSTAMP"
append.m_exp16 = "@TBLPOSTINGDATAIMPORT->TRANSACTIONSTAMP"
append.m_field17 = "FRONTIMAGE"
append.m_exp17 = "@TBLPOSTINGDATAIMPORT->FRONTIMAGE"
append.m_field18 = "BACKIMAGE"
append.m_exp18 = "@TBLPOSTINGDATAIMPORT->BACKIMAGE"
append.m_field19 = "RETURNREASON"
append.m_exp19 = "@TBLPOSTINGDATAIMPORT->RETURNREASON"
append.m_field20 = "BOFDBUSDATE"
append.m_exp20 = "@TBLPOSTINGDATAIMPORT->BOFDBUSDATE"
append.m_field21 = "BOFDROUTINGNUM"
append.m_exp21 = "@TBLPOSTINGDATAIMPORT->BOFDROUTINGNUM"
append.m_field22 = "ONUSRETURNRECORD"
append.m_exp22 = "@TBLPOSTINGDATAIMPORT->ONUSRETURNRECORD"
append.m_field23 = "EXTERNALPROCCODE"
append.m_exp23 = "@TBLPOSTINGDATAIMPORT->EXTERNALPROCCODE"
append.m_field24 = "PBROUTINGNUM"
append.m_exp24 = "@TBLPOSTINGDATAIMPORT->PBROUTINGNUM"
append.m_field25 = "PBROUTINGNUMCD"
append.m_exp25 = "@TBLPOSTINGDATAIMPORT->PBROUTINGNUMCD"
append.m_field26 = "IMGCREATORDATE"
append.m_exp26 = "@TBLPOSTINGDATAIMPORT->IMGCREATORDATE"
append.m_field27 = "BOFD8"
append.m_exp27 = "@TBLPOSTINGDATAIMPORT->BOFD8"
append.m_field28 = "RESPONSE"
append.m_exp28 = "@TBLPOSTINGDATAIMPORT->RESPONSE"
append.m_field29 = "CALLDATE"
append.m_exp29 = "@TBLPOSTINGDATAIMPORT->CALLDATE"
append.m_field30 = "CALLTIME"
append.m_exp30 = "@TBLPOSTINGDATAIMPORT->CALLTIME"
append.m_field31 = "TIMESPRESENTED"
append.m_exp31 = "@TBLPOSTINGDATAIMPORT->TIMESPRESENTED"
append.t_count = 0
'Prompt for confirmation before running the Operation.......
dim rec_count as n
rec_count = a5_get_records_in_query("tblpostingdataimport",append.t_filter,-1,.f.)
message_text = "A maximum of "+rec_count + " record(s) will be appended from 'tblpostingdataimport', to 'tblpostingdata'. "+crlf(2)+ "OK to proceed?"
operation_result=ui_msg_box("Append Operation",message_text,UI_OK_CANCEL+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
If operation_result <> ui_ok_selected then
end
end if
a_tbl.append()
GOTO CONTINUE01092008091712734
ERROR01092008091712734:
ON ERROR GOTO 0
ui_msg_box("Error","Error running Append Operation"+crlf()+error_text_get())
END
CONTINUE01092008091712734:
a_tbl.close()
'Display a dialog box showing the results of the Operation
dim args as sql::arguments
if eval_valid("arguments") then
if typeof(arguments) = "P" then
args = arguments
end if
end if
a5_append_op_result(a_records_processed,a_records_total,a_records_violated, "tblpostingdata","Append Operation Result",args)
'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
Comment