This project is read-only.

Check Constraint Error

Mar 18, 2008 at 3:01 AM
Hi

I add a geometry column into a table with data, then update the table, but it has an error:

Error:
Msg 547, Level 16, State 0, Line 1
The UPDATE statement conflicted with the CHECK constraint "enforcesridEptRutas_theGeo". The conflict occurred in database "BuboMap2", table "Bubo.EptRutas", column 'theGeo'.
The statement has been terminated.

Step 1. Create Geometry Column
exec ST.AddGeometryColumn 'Bubo', 'EptRutas', 'theGeo', 4326, 'GEOMETRY'

2. Update (here error... )
update Bubo.EptRutas
set theGeo = the_geom,
theGeoEnvelopeMinX = r.thegeomEnvelope_MinX,
theGeoEnvelopeMinY = r.thegeomEnvelope_MinY,
theGeoEnvelopeMaxX = r.thegeomEnvelope_MaxX,
theGeoEnvelopeMaxY = r.thegeomEnvelope_MaxY
from dbo.tempruta r
where ...

excuse my english, is very bad.. my language is spanish..