Opened 10 years ago

Closed 9 years ago

#5696 closed defect (fixed)

MSSQL Spatial driver - Bug in SQL when creating table.

Reported by: vaticanuk Owned by: tamas
Priority: normal Milestone: 1.11.2
Component: OGR_SF Version: unspecified
Severity: critical Keywords:
Cc:

Description

377 oStmt.Appendf("CREATE TABLE [%s].[%s] ([ogr_fid] [int] IDENTITY(1,1) NOT NULL" 378 "CONSTRAINT [PK_%s] PRIMARY KEY CLUSTERED ([ogr_fid] ASC))",

There needs to be a space either at the end of the string on line 377 or the start of the string on line 378. Otherwise the generated sql reads as "... NULLCONSTRAINT ..." which is invalid sql and the table creation fails.

Change History (2)

comment:1 by jpalmer, 9 years ago

Just to clarify this ticket - it's only when you are creating a table (e.g type = WkbNone). The error does not occur when creating a spatial layer.

comment:2 by tamas, 9 years ago

Milestone: 1.11.2
Resolution: fixed
Status: newclosed

Fixed in trunk(r28286) and branch-1.11 (r28287)

Note: See TracTickets for help on using tickets.