#5155 closed defect (fixed)
MSSQL Spatial Plain Tables (No Geometry)
Reported by: | jpalmer | Owned by: | tamas |
---|---|---|---|
Priority: | normal | Milestone: | 1.11.0 |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | |
Cc: |
Description
When trying to create a table without a geometry column using the MSSQLSpatial driver no table is created and no error is thrown.
e.g (Python API):
layer = ds.CreateLayer('my_table', srs = None, geom_type = ogr.wkbNone, options = OVERWRITE=YES)
In this case the CreateLayer method returns successfully with a valid layer object.
I've tracked this down to this code:
As a minimum the logic should be changed to throw an error if wkbNone is used for the layer geometry type.
However why not allow geometryless tables be created? Just about all of the other database driver allow this.
Attachments (1)
Change History (4)
by , 11 years ago
Attachment: | mssql_plain_tables_support.diff added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Milestone: | 1.10.1 → 2.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 10 years ago
Milestone: | 2.0 → 1.11.0 |
---|
Note:
See TracTickets
for help on using tickets.
I've attached a patch that implements support for listing, reading and writing non spatial user tables using the MSSQLSpatial driver. The user must set the MSSQLSPATIAL_LIST_ALL_TABLES=YES configuration option to be able to read and list non spatial tables.
In addition I have fixed a bug with ODBC driver complaining about not allowing multiple active query statements per connection. This bug occurred because one query statement was not completed/cleared if the tables had a primary keys with more than 2 columns.