Select to view content in your preferred language

SQL Statement GeoDatabase vs SDE

714
2
05-16-2011 01:24 PM
JayKappy
Frequent Contributor
CANT UPDATE STANDALONE SDE TABLE in ARcPAD

I have code that is running fine from a Geodatabase...there is a standalone table that is related to a FC....
I am using a SQL statment to write to this table and create historical records.

My problem starts when I move the data to SDE and try and do the same....
I simply imported the Geodatabase into my SDE...the FC point is in a dataset with the relationship class, and the standalone table is at the root. Now the SQL statement below errors saying cant find table

1. Could the . (periods) in the code below be causing the problem?
2. Could the fact that the data is not in the same dataset be the problem?

This works with the Geodatabase
sSQL = "INSERT INTO OUFALLS_HISTORICAL (INSPECT_BY, UNIQUE_ID1, UNIQUE_ID, OF_RECWTR, INSPECT_YR, GRATE_, CONDTN, AXF_TIMESTAMP, AXF_STATUS) VALUES ('" & varcbo_User & "', '" & vartxtUniqueID & "', '" & vartxtUniqueID & "', '" & varreceivewater & "', '" & vardate & "', '" & vargrate & "', '" & varcondition & "', getDate(), 1)" 


I try this with the SDE data and it wont work....
sSQL = "INSERT INTO MG_SDE.MG_GENERAL.outfalls_historical (INSPECT_BY, UNIQUE_ID1, UNIQUE_ID, OF_RECWTR, INSPECT_YR, GRATE_, CONDTN, AXF_TIMESTAMP, AXF_STATUS) VALUES ('" & varcbo_User & "', '" & vartxtUniqueID & "', '" & vartxtUniqueID & "', '" & varreceivewater & "', '" & vardate & "', '" & vargrate & "', '" & varcondition & "', getDate(), 1)" 


MG_SDE.MG_GENERAL.outfalls_historical has . which must be messing it up?
Do I need to change the name of the standalone table, and remove the . ?
Tags (3)
0 Kudos
2 Replies
JayKappy
Frequent Contributor
Think I got it....
0 Kudos
JayKappy
Frequent Contributor
Yes got it....I tried every way I could think of to reference the table....
I then explored i the axf file in studio and found the correct spelling of the table.
I think it is case specific as well...I followed the case and spelling in the axf file and it worked...

Same code as posted above....just changed the name of the table to what was reflected in the axf file.

In ArcMap the table is referenced like this
MG_SDE.MG_GENERAL.outfalls_historical

I then tried this getting rid of the SDE references
outfalls_historical

Then found the axf file created shows it as
OUTFALLS_HISTORICAL

3 different ways to represent the same table...some consistancy would be nice
0 Kudos