Hello,
I generated DataContext models from PostgreSQL database with Entity Developer new version. I can't insert, update and delete all of my tables in my program.
AuthorizationDataContext dc = new AuthorizationDataContext(connectString);
FirstChars f = new FirstChars();
...
dc.FirstChars.InsertOnSubmit(f);
And give me an exception:
System.InvalidOperationException: Can't perform Create, Update or Delete operations on 'Table(FirstChars)' because it is read-only or does not have identity members.
Devart.Data.Linq.Table.l()
Devart.Data.Linq.Table.c(Object A_0, Boolean A_1)
Devart.Data.Linq.Table`1.InsertOnSubmit(TEntity entity)
FirstChars is a simple table with three character varring fields: FirstThreeCharacters, SoftwareName, SoftwareVersion.
The role that i used in ConnectString have got privileges these operations in database.
Best Regards:
Imre
Create, delete and update problem
-
- Posts: 18
- Joined: Thu 11 Mar 2010 20:36
-
- Posts: 18
- Joined: Thu 11 Mar 2010 20:36
I created a test on my server, and create a model. You can access to my database with this model. It's a simple test, but the entity key is false default.AndreyR wrote:Could you please post here the script of the table you have encountered an error with the wrong Entity Key generation?
The table creation SQL script is
create table testtable
(
test_id serial,
test_note varchar(100)
);
http://dl.dropbox.com/u/3968115/Test.zip
Regards:
Imre