Can't insert data into SQL Server

3 messages Options
Embed this post
Permalink
Chris Erickson-2

Can't insert data into SQL Server

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hello,

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.

 

Can anyone tell me what I’m doing wrong?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Brent Robinson

RE: Can't insert data into SQL Server

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi Chris,

 

Adding a primary key to the table should get rid of the error.

 

Brent.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Thursday, August 20, 2009 7:11 PM
To: [hidden email]
Subject: [fdo-users] Can't insert data into SQL Server

 

Hello,

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.

 

Can anyone tell me what I’m doing wrong?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Chris Erickson-2

RE: Can't insert data into SQL Server

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Thanks, I had a logical one but forgot to mark it as such.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Brent Robinson
Sent: Thursday, August 20, 2009 6:53 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Can't insert data into SQL Server

 

Hi Chris,

 

Adding a primary key to the table should get rid of the error.

 

Brent.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Thursday, August 20, 2009 7:11 PM
To: [hidden email]
Subject: [fdo-users] Can't insert data into SQL Server

 

Hello,

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.

 

Can anyone tell me what I’m doing wrong?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users