I get the same kind of commit errors when I change geometry for any of my SQL Spatial feature classes. I have traced the error back to the following error message in QGIS (version 2.16.2):
A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry": System.FormatException: 24114: The label PointZ (1994269.8154 in the input well-known text (WKT) is not valid. Valid labels are POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION, CIRCULARSTRING, COMPOUNDCURVE, CURVEPOLYGON and FULLGLOBE (geography Data Type only). System.FormatException: at Microsoft.SqlServer.Types.OpenGisTypes.ParseLabel(String input) at Microsoft.SqlServer.Types.WellKnownTextReader.ParseTaggedText(OpenGisType type) at Microsoft.SqlServer.Types.WellKnownTextReader.Read(OpenGisType type, Int32 srid) at Microsoft.SqlServer.Types.SqlGeometry.GeometryFromText(OpenGisType type, SqlChars text, Int32 srid) . [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated. QODBC3: Unable to execute statement. My original geometry type is Point, and SQL Server does not recognize PointZ as a geometry type. This tells me that QGIS might be attempting a geometry move in SQL Server by updating the geometry field to the coordinates I move to, but writing a PointZ type. I am not sure if it attempts the same kind of thing for Linestring types (changing to LinestringZ for example). I have this as an open question on GIS Stack Exchange: "Cannot commit simple edit actions (move or change node) in MSSQL feature class in QGIS". I am hoping a seasoned Python/QGIS developer can take a look at this, because I wouldn't mind using QGIS regularly for editing features in my enterprise database (in SQL Server). -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Thursday, September 15, 2016 5:31 AM To: [email protected] Subject: Qgis-user Digest, Vol 127, Issue 41 Send Qgis-user mailing list submissions to [email protected]<mailto:[email protected]> To subscribe or unsubscribe via the World Wide Web, visit http://lists.osgeo.org/mailman/listinfo/qgis-user or, via email, send a message with subject or body 'help' to [email protected]<mailto:[email protected]> You can reach the person managing the list at [email protected]<mailto:[email protected]> When replying, please edit your Subject line so it is more specific than "Re: Contents of Qgis-user digest..." ------ Message: 2 Date: Thu, 15 Sep 2016 11:14:19 +1000 From: Johanna Botman <[email protected]<mailto:[email protected]>> To: James Wood <[email protected]<mailto:[email protected]>>, [email protected]<mailto:[email protected]> Subject: Re: [Qgis-user] Fail to commit changes to SQL database Message-ID: <of0f6f8398.671c32bf-onca25802f.0006a366-ca25802f.0006c...@griffith.nsw.gov.au<mailto:of0f6f8398.671c32bf-onca25802f.0006a366-ca25802f.0006c...@griffith.nsw.gov.au>> Content-Type: text/plain; charset="utf-8" Thanks James, We are using SQL 2014 SP2. I don't know if we are using ST_Geometry. I have asked our consultant and he has not got back to me yet. _______________ Johanna Botman GIS / Assets Officer Griffith City Council Ph: 02 6962 8168 James Wood <[email protected]<mailto:[email protected]>> wrote on 15/09/2016 12:43:31 AM: > From: James Wood <[email protected]<mailto:[email protected]>> > To: Johanna Botman > <[email protected]<mailto:[email protected]>> > Cc: [email protected]<mailto:[email protected]> > Date: 15/09/2016 12:43 AM > Subject: Re: [Qgis-user] Fail to commit changes to SQL database > > I have seen similar behavior with SQL Server 2012, so I would be > interested to hear from the user community as well. > > Johanna, > What version of SQL and is this SQL Spatial (ST Geometry)? > > Thanks, > James > Sent from my iPhone > > On Sep 13, 2016, at 22:42, Johanna Botman <[email protected] > > wrote: > I'm working on a [road] line layer and changing the geometry so that > it matches the aerial image. I can make some changes and save them, > but then suddenly I can't save anymore changes. > In the yellow line at the top of the canvas it says Commit Errors: > Could not commit changes to layer [road]. When I click the 'show more' > it simply says 'Errors: ERROR: [x] geometries not changed' > > I can shut QGIS down and restart it. Then I still cannot change that > last geometry that caused the issue, but I can change others until I > get that message again. I have rebooted my machine and I made a little > more progress but still come up against the error. > > My research in stack exchange yielded nothing in relation to SQL > server, but I asked our IT to have a look at the logs anyway. They > said there was nothing in the SQL logs either. > > I am using QGIS 2.14.4 and this particular table is on a SQL server. > > Any ideas? > _______________ > Johanna Botman > GIS / Assets Officer > > Griffith City Council > Ph: 02 6962 8168 > > Please consider the environment before printing this email notice. -------------------------------------------------------------------- This e-mail, together with any attachments, is for the exclusive and confidential use of the addressee(s). Confidentiality is not waived if you are not the intended recipient. Any other distribution, use of, or reproduction without prior written consent is strictly prohibited. Views expressed in this e-mail are those of the individual, except where specifically stated otherwise. If this e-mail has been sent to you in error, please delete the e-mail completely and immediately from your system. Although reasonable precautions are taken, Griffith City Council does not warrant or guarantee this message to be free of errors, interference, viruses or similar malicious code and does not accept liability for any consequences to the recipient opening or using this email or attachments. This email was scanned and cleared by MailMarshal, Sophos and Kaspersky AV --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160915/c9440b3a/attachment-0001.html> ------------------------------
_______________________________________________ Qgis-user mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
