[fdo-trac] #550: SQL Spatial - poor error message when trying to insert into a table without a primary key

FDO trac_fdo at osgeo.org
Fri Aug 21 11:58:08 EDT 2009


#550: SQL Spatial - poor error message when trying to insert into a table without
a primary key
-----------------------------+----------------------------------------------
   Reporter:  chriserickson  |       Owner:  gregboone
       Type:  defect         |      Status:  new      
   Priority:  major          |   Milestone:  3.5.0    
  Component:  FDO API        |     Version:  3.4.0    
   Severity:  3              |    Keywords:           
External_id:                 |  
-----------------------------+----------------------------------------------
 I have created a basic table in SQL 2008, with 3 fields: ID (char[36]),
 Shape (Geometry), Description (varchar(255).

 When I try and insert data, I’m getting an error: “Creating/Updating a
 standalone instance for class 'TestGeometry' is not allowed.”

 Here is a snippet of when it is happening:

     IInsert insertCommand =
 (IInsert)_database._connection.CreateCommand(CommandType.CommandType_Insert);
                 insertCommand.SetFeatureClassName(_class.QualifiedName);
 <- happens on this line.

 It turns out this is caused by the table not having a primary key set.
 The error message is not helpful in discerning the cause of the error.

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/550>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list