I have a problem with append in Xbasic. I can create an append with the genie and it works fine but if I convert it to xbasic via the script recorder and then run the script I get a fields and expression must be equal error. The converted script is below. If I convert to high level script it works fine as well.
a_tbl = table.current()
append.t_db = "c:ted's autoted's auto archiveted's auto.dbf"
append.m_key = ""
append.t_key = ""
append.m_filter = ""
append.t_filter = "LHOURS1>0"
append.type = "All"
append.m_count = 5
append.m_field1 = "Employee"
append.m_exp1 = "Ted_S_Auto->Emp1"
append.m_field2 = "Invocno"
append.m_exp2 = "Ted_S_Auto->Invocno"
append.m_field3 = "Lhours"
append.m_exp3 = "Ted_S_Auto->Lhours1"
append.m_field4 = "Datepaid"
append.m_exp4 = "Ted_S_Auto->Datepaid"
append.m_field5 = "Ldesc"
append.m_exp5 = "Ted_S_Auto->Ldesc1"
append.t_count = 0
a_tbl.append()
I tried all the things I could find on the message boards, changing line 1 to a_tbl = table.open("labor"), adding a @ to append.m_exp1 = "@ted_Auto->Emp1" and etc to the other append.m_exp lines. Still Same Error.
debug shows the error happening on the last line a_tbl.append().
tried redoing the append to only 1 field, same error. tried redoing to a different 1 field, same error.
The transaction dbf has 50 or so fields, master has only 5. those 5 are identical to the 5 I am trying to append. 2 character, 2 num, and 1 date. they are the same type have the same width, and decimals etc.
So what can I do next??? This is making me crazy!
a_tbl = table.current()
append.t_db = "c:ted's autoted's auto archiveted's auto.dbf"
append.m_key = ""
append.t_key = ""
append.m_filter = ""
append.t_filter = "LHOURS1>0"
append.type = "All"
append.m_count = 5
append.m_field1 = "Employee"
append.m_exp1 = "Ted_S_Auto->Emp1"
append.m_field2 = "Invocno"
append.m_exp2 = "Ted_S_Auto->Invocno"
append.m_field3 = "Lhours"
append.m_exp3 = "Ted_S_Auto->Lhours1"
append.m_field4 = "Datepaid"
append.m_exp4 = "Ted_S_Auto->Datepaid"
append.m_field5 = "Ldesc"
append.m_exp5 = "Ted_S_Auto->Ldesc1"
append.t_count = 0
a_tbl.append()
I tried all the things I could find on the message boards, changing line 1 to a_tbl = table.open("labor"), adding a @ to append.m_exp1 = "@ted_Auto->Emp1" and etc to the other append.m_exp lines. Still Same Error.
debug shows the error happening on the last line a_tbl.append().
tried redoing the append to only 1 field, same error. tried redoing to a different 1 field, same error.
The transaction dbf has 50 or so fields, master has only 5. those 5 are identical to the 5 I am trying to append. 2 character, 2 num, and 1 date. they are the same type have the same width, and decimals etc.
So what can I do next??? This is making me crazy!
Comment