Update feature class MS SQL Server

2643
6
10-16-2015 02:46 PM
JordanParfitt
Occasional Contributor

I tried updated the geometry in my Feature Class using geometry:STPointFromText and it looked as though it worked but then the MXD wouldn't publish. I fixed it by exporting to a FGDB then re importing.

Are you allowed to at least edit the tabular data in SQL Server Management Studio (text, int, guid, etc)? Or are you required to do everything through ArcMap? I just don't want this to happen again.

0 Kudos
6 Replies
ThomasColson
MVP Frequent Contributor

that "Should" have worked. Can you give more details, what version of ArcSDE, SQL, is the FC using Esri Binary, Geog, or Geom Storage? What is the SRID? Where there any null or outside of scope values? If using Geog/WGS84, you have have created an outside-of-sphere error, which would result in the error you describe. See Repetitive Attribute Values Automated with SQL  for an example of how STPointFromText can be automated.

0 Kudos
JordanParfitt
Occasional Contributor

SDE 10.3

SQL Server 2012 R2

My SQL was:

update USERASSIGNMENT set shape =  geometry::STPointFromText('POINT (26037125.623245418 652287.62337251008)', 102688) where OBJECTID > 0

The one thing I should have mentioned but didnt was that it published fine unless I wanted to sync enable it. So I  enabled archiving, then publish as a feature layer with sync enabled. Then it failed with a generic error but the logs said something like "unable to publish because the feature layer isn't sync enabled."

Thanks

0 Kudos
VinceAngelo
Esri Esteemed Contributor

Did you really want to clobber all geometries in the table to have a single coordinate value?  Is the data really accurate to sub-Angstrom precision? It would help if you provide a clear description of your procedure, including exact commands and exact error messages.

- V

0 Kudos
JordanParfitt
Occasional Contributor

The exact errror message from the logs was:

Layer(s) or table(s) are not configured for Sync.

I did want everything to have the same geometry. I just needed every feature to be contained within the state of Michigan, the exact location doesn't matter. The dot showed up in my MXD just fine, I just had to export then reimport multiple tables in order to get them to publish.

Thanks Guys!

0 Kudos
JasonTipton
Occasional Contributor III
0 Kudos
JordanParfitt
Occasional Contributor

Yep

I fixed the problem just wanted to know if it was a known issue. If it's not its probably something obscure I did.

0 Kudos