Opened 16 years ago
Last modified 15 months ago
#550 new defect
SQL Spatial - poor error message when trying to insert into a table without a primary key
Reported by: | chriserickson | Owned by: | brentrobinson |
---|---|---|---|
Priority: | major | Milestone: | 4.2.0 |
Component: | FDO API | Version: | 3.4.0 |
Severity: | 3 | Keywords: | |
Cc: | External ID: |
Description ¶
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.
Change History (2)
comment:1 by , 14 years ago
Milestone: | 3.5.0 → 3.6.0 |
---|---|
Owner: | changed from | to
comment:2 by , 15 months ago
Milestone: | 3.6.0 → 4.2.0 |
---|