Finally got around to playing with this again. According to Tech Support my original problem is due to a known issue in ArcSDE. ArcSDE does not play well when the business table has a pre-defined USER maintained RowID and you add a row manually. I'm guessing it causes the iTable to get out of sync, among other things. So I've been messing around with se_toolkit in hopes of avoiding writing my own C routine to do this import. I think I can do what I need but I was hoping somebody, maybe Vince, would have some insights. I've a few questions:
1) Given I am looking to append to an existing SDE layer, is asc2sde or sdeupdate more appropriate?
2) How do I handle columns that are not present in my incoming flat file, but that have defaults set up in my table definition, i.e. CreatedTimeStamp defaults to CURRENT_TIMESTAMP when a record gets added, but the flat file itself has no relationship to this column?
3) Within the COLUMNS section of a control file, there seems to be a five section structure, the first section of which is the column name, the second is data type or calculated value, what is the third section? It is a dash (-) in the samples, but in the old forums I saw an example with values in this section.
4) What am I missing if I get an error saying "Target table does not have 'XX' column", when in fact the target table does have 'XX' column? I've listed all columns in the table in the control file.
Here's some sample data, with a bit of redaction:
MI,XXXXX,MIB1295XXXX,WAYNE,DETROIT /C,TORONTO ST,25,ARTURO GOMEZ,20111023,REMV/REPLC CURB & SDWLK,CLR,PDEGT,42.2770400,-83.1521100,42.2770400,-83.1521100
NJ,XXXX,NJ11296XXXX,UNION,LINDEN,4001 S WOOD AVE,5,NATALIE SOUSA,20111023,EMERGENCY - REPAIR/REPLACE WATER FACILITY,CLR,PDRMW,,,,
Here's the text of my control file:
SETENV TZ="UTC"
SKIP 1
DELIMITERS ","
COORDSYS GCS_WGS_1984
COORDREF_XY -210,-120,1000000
EFLAGS "np"
COLUMNS
OneCalls_ID Sequence() - 10 N
StateCode String - 2 N
MemberCode String - 10 N
TicketNum String - 15 N
County String - 30 Y
Place String - 30 Y
StreetAddress String - 50 Y
TicketType String - 5 Y
Requestor String - 50 Y
CompletionDate Date("%Y%M%D") - 8 Y
WorkType String - 250 Y
Disposition String - 10 Y
Locator String - 50 Y
BeginLatitude Latitude(DD) - 12.7 Y
BeginLongitude Longitude(DD) - 12.7 Y
EndLatitude Latitude(DD) - 12.7 Y
EndLongitude Longitude(DD) - 12.7 Y
Create_TS Date("CURRENT_TIMESTAMP") - 20 N
shape GeoPoint(BeginLatitude,BeginLongitude) - 1 Y
END
Many thanks.
Jeff