olivier57

Merge_Management problem

Discussion created by olivier57 on Jan 29, 2012
Hi,

I encounter a very strange problem. Consider the two pieces of code below, when Merge_Management is placed before rows_tab cursor declaration (2 before 1), I'm not able to use anymore rows_tab insertion later, I get an error message

Here is part of the code :

Main :

row_tab = rows_tab.NewRow() # this works ok
row_tab.id = new_id
rows_tab.insertRow(row_tab)  # error at this point

RuntimeError: ERROR 999999: Error executing function.
object is incorrect or isn't anymore defined.

It's look like gp.Merge_Management was somewhere canceling the insert cursor even if this one works on a completely different table.

I would appreciate any help.

Olivier
ArcEditor 9.3/Microsoft Access

1)
nset = "nset"
gp.MakeQueryTable_management(ntab, ntkset, "NO_KEY_FIELD", "", "", "")
rows_tab = gp.InsertCursor(ntab)



2)
pnt_set = "pnt_set"
gp.MakeTableView_management(pnt_layer, pnt_set,"", "", "F1.ID PT_ID;PT.NAME PT_NAME")

sit_set = "sit_set"
gp.MakeTableView_management(sit_layer, sit_set, "", "", "F2.ID PT_ID;SI.NAME SI_NAME") 

pnt_all = "pnt_all"
gp.Merge_management("pnt_set;sit_set", pnt_all,"")

Outcomes